Lines Matching defs:sg2d

48     public void drawLine(SunGraphics2D sg2d, int x1, int y1, int x2, int y2) {
49 drawLine(sg2d, (float) x1, (float) y1, (float) x2, (float) y2);
54 public void drawLine(SunGraphics2D sg2d, float x1, float y1, float x2, float y2) {
55 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
56 if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
57 surfaceData.doLine(this, sg2d, x1, y1, x2, y2);
68 drawfillShape(sg2d, sg2d.stroke.createStrokedShape(lineToShape), true, true);
75 public void drawRect(SunGraphics2D sg2d, int x, int y, int width, int height) {
76 drawRect(sg2d, (float) x, (float) y, (float) width, (float) height);
81 public void drawRect(SunGraphics2D sg2d, float x, float y, float width, float height) {
84 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
85 if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
86 surfaceData.doRect(this, sg2d, x, y, width, height, false);
97 drawfillShape(sg2d, sg2d.stroke.createStrokedShape(rectToShape), true, true);
102 public void fillRect(SunGraphics2D sg2d, int x, int y, int width, int height) {
103 fillRect(sg2d, (float) x, (float) y, (float) width, (float) height);
106 public void fillRect(SunGraphics2D sg2d, float x, float y, float width, float height) {
108 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
109 surfaceData.doRect(this, sg2d, x, y, width, height, true);
115 public void drawRoundRect(SunGraphics2D sg2d, int x, int y, int width, int height, int arcWidth, int arcHeight) {
116 drawRoundRect(sg2d, (float) x, (float) y, (float) width, (float) height, (float) arcWidth, (float) arcHeight);
121 public void drawRoundRect(SunGraphics2D sg2d, float x, float y, float width, float height, float arcWidth, float arcHeight) {
124 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
125 if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
126 surfaceData.doRoundRect(this, sg2d, x, y, width, height, arcWidth, arcHeight, false);
137 drawfillShape(sg2d, sg2d.stroke.createStrokedShape(roundrectToShape), true, true);
142 public void fillRoundRect(SunGraphics2D sg2d, int x, int y, int width, int height, int arcWidth, int arcHeight) {
143 fillRoundRect(sg2d, (float) x, (float) y, (float) width, (float) height, (float) arcWidth, (float) arcHeight);
146 public void fillRoundRect(SunGraphics2D sg2d, float x, float y, float width, float height, float arcWidth, float arcHeight) {
148 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
149 surfaceData.doRoundRect(this, sg2d, x, y, width, height, arcWidth, arcHeight, true);
154 public void drawOval(SunGraphics2D sg2d, int x, int y, int width, int height) {
155 drawOval(sg2d, (float) x, (float) y, (float) width, (float) height);
160 public void drawOval(SunGraphics2D sg2d, float x, float y, float width, float height) {
163 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
164 if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
165 surfaceData.doOval(this, sg2d, x, y, width, height, false);
176 drawfillShape(sg2d, sg2d.stroke.createStrokedShape(ovalToShape), true, true);
181 public void fillOval(SunGraphics2D sg2d, int x, int y, int width, int height) {
182 fillOval(sg2d, (float) x, (float) y, (float) width, (float) height);
185 public void fillOval(SunGraphics2D sg2d, float x, float y, float width, float height) {
187 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
188 surfaceData.doOval(this, sg2d, x, y, width, height, true);
193 public void drawArc(SunGraphics2D sg2d, int x, int y, int width, int height, int startAngle, int arcAngle) {
194 drawArc(sg2d, x, y, width, height, startAngle, arcAngle, Arc2D.OPEN);
199 public void drawArc(SunGraphics2D sg2d, float x, float y, float width, float height, float startAngle, float arcAngle, int type) {
202 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
203 if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
204 surfaceData.doArc(this, sg2d, x, y, width, height, startAngle, arcAngle, type, false);
215 drawfillShape(sg2d, sg2d.stroke.createStrokedShape(arcToShape), true, true);
220 public void fillArc(SunGraphics2D sg2d, int x, int y, int width, int height, int startAngle, int arcAngle) {
221 fillArc(sg2d, x, y, width, height, startAngle, arcAngle, Arc2D.PIE);
224 public void fillArc(SunGraphics2D sg2d, float x, float y, float width, float height, float startAngle, float arcAngle, int type) {
227 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
228 surfaceData.doArc(this, sg2d, x, y, width, height, startAngle, arcAngle, type, true);
233 public void drawPolyline(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints) {
234 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
235 if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
236 surfaceData.doPolygon(this, sg2d, xpoints, ypoints, npoints, false, false);
243 drawfillShape(sg2d, sg2d.stroke.createStrokedShape(polyToShape), true, true);
247 public void drawPolygon(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints) {
248 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
249 if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
250 surfaceData.doPolygon(this, sg2d, xpoints, ypoints, npoints, true, false);
258 drawfillShape(sg2d, sg2d.stroke.createStrokedShape(polyToShape), true, true);
262 public void fillPolygon(SunGraphics2D sg2d, int xpoints[], int ypoints[], int npoints) {
263 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
264 surfaceData.doPolygon(this, sg2d, xpoints, ypoints, npoints, true, true);
269 void drawfillShape(SunGraphics2D sg2d, Shape s, boolean isfill, boolean shouldApplyOffset) {
272 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
275 if (sOptimizeShapes && OSXSurfaceData.IsSimpleColor(sg2d.paint)) {
284 fillRect(sg2d, x, y, w, h);
286 drawRect(sg2d, x, y, w, h);
297 fillOval(sg2d, x, y, w, h);
299 drawOval(sg2d, x, y, w, h);
312 fillArc(sg2d, x, y, w, h, as, ae, arc.getArcType());
314 drawArc(sg2d, x, y, w, h, as, ae, arc.getArcType());
327 fillRoundRect(sg2d, x, y, w, h, aw, ah);
329 drawRoundRect(sg2d, x, y, w, h, aw, ah);
339 drawLine(sg2d, x1, y1, x2, y2);
346 drawLine(sg2d, x, y, x, y);
358 surfaceData.drawfillShape(this, sg2d, gp, isfill, shouldApplyOffset);
372 surfaceData.drawfillShape(this, sg2d, gp, isfill, shouldApplyOffset);
377 public void draw(SunGraphics2D sg2d, Shape s) {
378 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
379 if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
380 drawfillShape(sg2d, s, false, true);
382 drawfillShape(sg2d, sg2d.stroke.createStrokedShape(s), true, true);
386 public void fill(SunGraphics2D sg2d, Shape s) {
387 drawfillShape(sg2d, s, true, false);
392 // Copy img to scaled sg2d @ x,y with width height
393 public boolean scaleImage(SunGraphics2D sg2d, Image img, int x, int y, int width, int height, Color bgColor) {
394 OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();
401 return scaleImage(sg2d, img, x, y, x + width, y + height, sx, sy, sx + iw, sy + ih, bgColor);
405 public boolean scaleImage(SunGraphics2D sg2d, Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgColor) {
455 return blitImage(sg2d, img, fliph, flipv, srcX, srcY, srcW, srcH, dstX, dstY, dstW, dstH, bgColor);
458 protected boolean blitImage(SunGraphics2D sg2d, Image img, boolean fliph, boolean flipv, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, Color bgColor) {
459 CPrinterSurfaceData surfaceData = (CPrinterSurfaceData)sg2d.getSurfaceData();
461 surfaceData.blitImage(this, sg2d, imgSurfaceData, fliph, flipv, sx, sy, sw, sh, dx, dy, dw, dh, bgColor);
465 // Copy img to sg2d @ x, y
466 protected boolean copyImage(SunGraphics2D sg2d, Image img, int dx, int dy, Color bgColor) {
474 return blitImage(sg2d, img, false, false, sx, sy, width, height, dx, dy, width, height, bgColor);
477 // Copy img, clipped to sx, sy with width, height to sg2d @ dx, dy
478 protected boolean copyImage(SunGraphics2D sg2d, Image img, int dx, int dy, int sx, int sy, int width, int height, Color bgColor) {
479 return blitImage(sg2d, img, false, false, sx, sy, width, height, dx, dy, width, height, bgColor);
482 protected void transformImage(SunGraphics2D sg2d, Image img, int x, int y, BufferedImageOp op, AffineTransform xf, Color bgColor) {
506 AffineTransform reset = sg2d.getTransform();
507 sg2d.transform(xf);
508 scaleImage(sg2d, img, x, y, x + iw, y + ih, 0, 0, iw, ih, bgColor);
509 sg2d.setTransform(reset);
511 scaleImage(sg2d, img, x, y, x + iw, y + ih, 0, 0, iw, ih, bgColor);
530 public boolean copyImage(SunGraphics2D sg2d, Image img, int x, int y, Color bgColor, ImageObserver observer) {
533 if (!(img instanceof sun.awt.image.ToolkitImage)) { return copyImage(sg2d, img, x, y, bgColor); }
538 return ir.drawToBufImage(sg2d, sunimg, x, y, bgColor, observer);
542 public boolean copyImage(SunGraphics2D sg2d, Image img, int dx, int dy, int sx, int sy, int width, int height, Color bgColor, ImageObserver observer) {
545 if (!(img instanceof sun.awt.image.ToolkitImage)) { return copyImage(sg2d, img, dx, dy, sx, sy, width, height, bgColor); }
550 return ir.drawToBufImage(sg2d, sunimg, dx, dy, (dx + width), (dy + height), sx, sy, (sx + width), (sy + height), null, observer);
554 public boolean scaleImage(SunGraphics2D sg2d, Image img, int x, int y, int width, int height, Color bgColor, ImageObserver observer) {
557 if (!(img instanceof sun.awt.image.ToolkitImage)) { return scaleImage(sg2d, img, x, y, width, height, bgColor); }
562 return ir.drawToBufImage(sg2d, sunimg, x, y, width, height, bgColor, observer);
566 public boolean scaleImage(SunGraphics2D sg2d, Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgColor, ImageObserver observer) {
569 if (!(img instanceof sun.awt.image.ToolkitImage)) { return scaleImage(sg2d, img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, bgColor); }
574 return ir.drawToBufImage(sg2d, sunimg, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, bgColor, observer);
578 public boolean transformImage(SunGraphics2D sg2d, Image img, AffineTransform atfm, ImageObserver observer) {
582 transformImage(sg2d, img, 0, 0, null, atfm, null);
589 return ir.drawToBufImage(sg2d, sunimg, atfm, observer);
593 public void transformImage(SunGraphics2D sg2d, BufferedImage img, BufferedImageOp op, int x, int y) {
595 transformImage(sg2d, img, x, y, op, null, null);