Lines Matching refs:sg2d

57     private final long validate(SunGraphics2D sg2d) {
73 // sg2d, so we have to protect against it in native code.
75 X11SurfaceData x11sd = (X11SurfaceData)sg2d.surfaceData;
76 return x11sd.getRenderGC(sg2d.getCompClip(),
77 sg2d.compositeState, sg2d.composite,
78 sg2d.pixel);
84 public void drawLine(SunGraphics2D sg2d, int x1, int y1, int x2, int y2) {
87 long xgc = validate(sg2d);
88 int transx = sg2d.transX;
89 int transy = sg2d.transY;
90 XDrawLine(sg2d.surfaceData.getNativeOps(), xgc,
100 public void drawRect(SunGraphics2D sg2d,
105 long xgc = validate(sg2d);
106 XDrawRect(sg2d.surfaceData.getNativeOps(), xgc,
107 x+sg2d.transX, y+sg2d.transY, width, height);
117 public void drawRoundRect(SunGraphics2D sg2d,
123 long xgc = validate(sg2d);
124 XDrawRoundRect(sg2d.surfaceData.getNativeOps(), xgc,
125 x+sg2d.transX, y+sg2d.transY, width, height,
135 public void drawOval(SunGraphics2D sg2d,
140 long xgc = validate(sg2d);
141 XDrawOval(sg2d.surfaceData.getNativeOps(), xgc,
142 x+sg2d.transX, y+sg2d.transY, width, height);
152 public void drawArc(SunGraphics2D sg2d,
158 long xgc = validate(sg2d);
159 XDrawArc(sg2d.surfaceData.getNativeOps(), xgc,
160 x+sg2d.transX, y+sg2d.transY, width, height,
172 public void drawPolyline(SunGraphics2D sg2d,
178 long xgc = validate(sg2d);
179 XDrawPoly(sg2d.surfaceData.getNativeOps(), xgc,
180 sg2d.transX, sg2d.transY,
187 public void drawPolygon(SunGraphics2D sg2d,
193 long xgc = validate(sg2d);
194 XDrawPoly(sg2d.surfaceData.getNativeOps(), xgc,
195 sg2d.transX, sg2d.transY,
205 public void fillRect(SunGraphics2D sg2d,
210 long xgc = validate(sg2d);
211 XFillRect(sg2d.surfaceData.getNativeOps(), xgc,
212 x+sg2d.transX, y+sg2d.transY, width, height);
222 public void fillRoundRect(SunGraphics2D sg2d,
228 long xgc = validate(sg2d);
229 XFillRoundRect(sg2d.surfaceData.getNativeOps(), xgc,
230 x+sg2d.transX, y+sg2d.transY, width, height,
240 public void fillOval(SunGraphics2D sg2d,
245 long xgc = validate(sg2d);
246 XFillOval(sg2d.surfaceData.getNativeOps(), xgc,
247 x+sg2d.transX, y+sg2d.transY, width, height);
257 public void fillArc(SunGraphics2D sg2d,
263 long xgc = validate(sg2d);
264 XFillArc(sg2d.surfaceData.getNativeOps(), xgc,
265 x+sg2d.transX, y+sg2d.transY, width, height,
277 public void fillPolygon(SunGraphics2D sg2d,
283 long xgc = validate(sg2d);
284 XFillPoly(sg2d.surfaceData.getNativeOps(), xgc,
285 sg2d.transX, sg2d.transY, xpoints, ypoints, npoints);
295 native void XDoPath(SunGraphics2D sg2d, long pXSData, long xgc,
299 private void doPath(SunGraphics2D sg2d, Shape s, boolean isFill) {
302 if (sg2d.transformState <= sg2d.TRANSFORM_INT_TRANSLATE) {
308 transx = sg2d.transX;
309 transy = sg2d.transY;
311 p2df = new Path2D.Float(s, sg2d.transform);
317 long xgc = validate(sg2d);
318 XDoPath(sg2d, sg2d.surfaceData.getNativeOps(), xgc,
325 public void draw(SunGraphics2D sg2d, Shape s) {
326 if (sg2d.strokeState == sg2d.STROKE_THIN) {
329 sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE)
332 drawPolygon(sg2d, p.xpoints, p.ypoints, p.npoints);
338 doPath(sg2d, s, false);
339 } else if (sg2d.strokeState < sg2d.STROKE_CUSTOM) {
343 ShapeSpanIterator si = LoopPipe.getStrokeSpans(sg2d, s);
347 long xgc = validate(sg2d);
348 XFillSpans(sg2d.surfaceData.getNativeOps(), xgc,
358 fill(sg2d, sg2d.stroke.createStrokedShape(s));
362 public void fill(SunGraphics2D sg2d, Shape s) {
363 if (sg2d.strokeState == sg2d.STROKE_THIN) {
366 sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE)
369 fillPolygon(sg2d, p.xpoints, p.ypoints, p.npoints);
375 doPath(sg2d, s, true);
381 if (sg2d.transformState < sg2d.TRANSFORM_TRANSLATESCALE) {
384 transx = sg2d.transX;
385 transy = sg2d.transY;
388 at = sg2d.transform;
392 ShapeSpanIterator ssi = LoopPipe.getFillSSI(sg2d);
396 Region clip = sg2d.getCompClip();
404 long xgc = validate(sg2d);
405 XFillSpans(sg2d.surfaceData.getNativeOps(), xgc,
464 void XDoPath(SunGraphics2D sg2d, long pXSData, long xgc,
471 super.XDoPath(sg2d, pXSData, xgc, transX, transY, p2df, isFill);