Пример #1
0
 static {
   gdiPipe = new GDIRenderer();
   if (GraphicsPrimitive.tracingEnabled()) {
     gdiPipe = gdiPipe.traceWrap();
   }
   gdiTxPipe = new PixelToShapeConverter(gdiPipe);
 }
Пример #2
0
 public boolean copyArea(SunGraphics2D sg2d, int x, int y, int w, int h, int dx, int dy) {
   CompositeType comptype = sg2d.imageComp;
   if (sg2d.clipState != SunGraphics2D.CLIP_SHAPE
       && (CompositeType.SrcOverNoEa.equals(comptype) || CompositeType.SrcNoEa.equals(comptype))) {
     int dstx1 = x + dx;
     int dsty1 = y + dy;
     int dstx2 = dstx1 + w;
     int dsty2 = dsty1 + h;
     Region clip = sg2d.getCompClip();
     if (dstx1 < clip.getLoX()) dstx1 = clip.getLoX();
     if (dsty1 < clip.getLoY()) dsty1 = clip.getLoY();
     if (dstx2 > clip.getHiX()) dstx2 = clip.getHiX();
     if (dsty2 > clip.getHiY()) dsty2 = clip.getHiY();
     if (dstx1 < dstx2 && dsty1 < dsty2) {
       gdiPipe.devCopyArea(this, dstx1 - dx, dsty1 - dy, dx, dy, dstx2 - dstx1, dsty2 - dsty1);
     }
     return true;
   }
   return false;
 }