< prev index next >

src/java.desktop/unix/classes/sun/java2d/x11/X11Renderer.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 153                         int x, int y, int width, int height,
 154                         int startAngle, int arcAngle)
 155     {
 156         SunToolkit.awtLock();
 157         try {
 158             long xgc = validate(sg2d);
 159             XDrawArc(sg2d.surfaceData.getNativeOps(), xgc,
 160                      x+sg2d.transX, y+sg2d.transY, width, height,
 161                      startAngle, arcAngle);
 162         } finally {
 163             SunToolkit.awtUnlock();
 164         }
 165     }
 166 
 167     native void XDrawPoly(long pXSData, long xgc,
 168                           int transx, int transy,
 169                           int[] xpoints, int[] ypoints,
 170                           int npoints, boolean isclosed);
 171 
 172     public void drawPolyline(SunGraphics2D sg2d,
 173                              int xpoints[], int ypoints[],
 174                              int npoints)
 175     {
 176         SunToolkit.awtLock();
 177         try {
 178             long xgc = validate(sg2d);
 179             XDrawPoly(sg2d.surfaceData.getNativeOps(), xgc,
 180                       sg2d.transX, sg2d.transY,
 181                       xpoints, ypoints, npoints, false);
 182         } finally {
 183             SunToolkit.awtUnlock();
 184         }
 185     }
 186 
 187     public void drawPolygon(SunGraphics2D sg2d,
 188                             int xpoints[], int ypoints[],
 189                             int npoints)
 190     {
 191         SunToolkit.awtLock();
 192         try {
 193             long xgc = validate(sg2d);
 194             XDrawPoly(sg2d.surfaceData.getNativeOps(), xgc,
 195                       sg2d.transX, sg2d.transY,
 196                       xpoints, ypoints, npoints, true);
 197         } finally {
 198             SunToolkit.awtUnlock();
 199         }
 200     }
 201 
 202     native void XFillRect(long pXSData, long xgc,
 203                           int x, int y, int w, int h);
 204 
 205     public void fillRect(SunGraphics2D sg2d,
 206                          int x, int y, int width, int height)
 207     {
 208         SunToolkit.awtLock();


 258                         int x, int y, int width, int height,
 259                         int startAngle, int arcAngle)
 260     {
 261         SunToolkit.awtLock();
 262         try {
 263             long xgc = validate(sg2d);
 264             XFillArc(sg2d.surfaceData.getNativeOps(), xgc,
 265                      x+sg2d.transX, y+sg2d.transY, width, height,
 266                      startAngle, arcAngle);
 267         } finally {
 268             SunToolkit.awtUnlock();
 269         }
 270     }
 271 
 272     native void XFillPoly(long pXSData, long xgc,
 273                           int transx, int transy,
 274                           int[] xpoints, int[] ypoints,
 275                           int npoints);
 276 
 277     public void fillPolygon(SunGraphics2D sg2d,
 278                             int xpoints[], int ypoints[],
 279                             int npoints)
 280     {
 281         SunToolkit.awtLock();
 282         try {
 283             long xgc = validate(sg2d);
 284             XFillPoly(sg2d.surfaceData.getNativeOps(), xgc,
 285                       sg2d.transX, sg2d.transY, xpoints, ypoints, npoints);
 286         } finally {
 287             SunToolkit.awtUnlock();
 288         }
 289     }
 290 
 291     native void XFillSpans(long pXSData, long xgc,
 292                            SpanIterator si, long iterator,
 293                            int transx, int transy);
 294 
 295     native void XDoPath(SunGraphics2D sg2d, long pXSData, long xgc,
 296                         int transX, int transY, Path2D.Float p2df,
 297                         boolean isFill);
 298 


   1 /*
   2  * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 153                         int x, int y, int width, int height,
 154                         int startAngle, int arcAngle)
 155     {
 156         SunToolkit.awtLock();
 157         try {
 158             long xgc = validate(sg2d);
 159             XDrawArc(sg2d.surfaceData.getNativeOps(), xgc,
 160                      x+sg2d.transX, y+sg2d.transY, width, height,
 161                      startAngle, arcAngle);
 162         } finally {
 163             SunToolkit.awtUnlock();
 164         }
 165     }
 166 
 167     native void XDrawPoly(long pXSData, long xgc,
 168                           int transx, int transy,
 169                           int[] xpoints, int[] ypoints,
 170                           int npoints, boolean isclosed);
 171 
 172     public void drawPolyline(SunGraphics2D sg2d,
 173                              int[] xpoints, int[] ypoints,
 174                              int npoints)
 175     {
 176         SunToolkit.awtLock();
 177         try {
 178             long xgc = validate(sg2d);
 179             XDrawPoly(sg2d.surfaceData.getNativeOps(), xgc,
 180                       sg2d.transX, sg2d.transY,
 181                       xpoints, ypoints, npoints, false);
 182         } finally {
 183             SunToolkit.awtUnlock();
 184         }
 185     }
 186 
 187     public void drawPolygon(SunGraphics2D sg2d,
 188                             int[] xpoints, int[] ypoints,
 189                             int npoints)
 190     {
 191         SunToolkit.awtLock();
 192         try {
 193             long xgc = validate(sg2d);
 194             XDrawPoly(sg2d.surfaceData.getNativeOps(), xgc,
 195                       sg2d.transX, sg2d.transY,
 196                       xpoints, ypoints, npoints, true);
 197         } finally {
 198             SunToolkit.awtUnlock();
 199         }
 200     }
 201 
 202     native void XFillRect(long pXSData, long xgc,
 203                           int x, int y, int w, int h);
 204 
 205     public void fillRect(SunGraphics2D sg2d,
 206                          int x, int y, int width, int height)
 207     {
 208         SunToolkit.awtLock();


 258                         int x, int y, int width, int height,
 259                         int startAngle, int arcAngle)
 260     {
 261         SunToolkit.awtLock();
 262         try {
 263             long xgc = validate(sg2d);
 264             XFillArc(sg2d.surfaceData.getNativeOps(), xgc,
 265                      x+sg2d.transX, y+sg2d.transY, width, height,
 266                      startAngle, arcAngle);
 267         } finally {
 268             SunToolkit.awtUnlock();
 269         }
 270     }
 271 
 272     native void XFillPoly(long pXSData, long xgc,
 273                           int transx, int transy,
 274                           int[] xpoints, int[] ypoints,
 275                           int npoints);
 276 
 277     public void fillPolygon(SunGraphics2D sg2d,
 278                             int[] xpoints, int[] ypoints,
 279                             int npoints)
 280     {
 281         SunToolkit.awtLock();
 282         try {
 283             long xgc = validate(sg2d);
 284             XFillPoly(sg2d.surfaceData.getNativeOps(), xgc,
 285                       sg2d.transX, sg2d.transY, xpoints, ypoints, npoints);
 286         } finally {
 287             SunToolkit.awtUnlock();
 288         }
 289     }
 290 
 291     native void XFillSpans(long pXSData, long xgc,
 292                            SpanIterator si, long iterator,
 293                            int transx, int transy);
 294 
 295     native void XDoPath(SunGraphics2D sg2d, long pXSData, long xgc,
 296                         int transX, int transY, Path2D.Float p2df,
 297                         boolean isFill);
 298 


< prev index next >