/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
native static void init();
// cache of the runtime options
static {
init(); // initialize coordinate tables for shapes
}
}
if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
} else {
if (lineToShape == null) {
synchronized (this) {
if (lineToShape == null) {
}
}
}
synchronized (lineToShape) {
}
}
}
}
if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
} else {
if (rectToShape == null) {
synchronized (this) {
if (rectToShape == null) {
}
}
}
synchronized (rectToShape) {
}
}
}
}
}
}
native void doRoundRect(SurfaceData sData, float x, float y, float width, float height, float arcW, float arcH, boolean isfill);
public void drawRoundRect(SunGraphics2D sg2d, int x, int y, int width, int height, int arcWidth, int arcHeight) {
drawRoundRect(sg2d, (float) x, (float) y, (float) width, (float) height, (float) arcWidth, (float) arcHeight);
}
public void drawRoundRect(SunGraphics2D sg2d, float x, float y, float width, float height, float arcWidth, float arcHeight) {
if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
} else {
if (roundrectToShape == null) {
synchronized (this) {
if (roundrectToShape == null) {
}
}
}
synchronized (roundrectToShape) {
}
}
}
public void fillRoundRect(SunGraphics2D sg2d, int x, int y, int width, int height, int arcWidth, int arcHeight) {
fillRoundRect(sg2d, (float) x, (float) y, (float) width, (float) height, (float) arcWidth, (float) arcHeight);
}
public void fillRoundRect(SunGraphics2D sg2d, float x, float y, float width, float height, float arcWidth, float arcHeight) {
}
}
if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
} else {
if (ovalToShape == null) {
synchronized (this) {
if (ovalToShape == null) {
}
}
}
synchronized (ovalToShape) {
}
}
}
}
}
native void doArc(SurfaceData sData, float x, float y, float width, float height, float angleStart, float angleExtent, int type, boolean isfill);
public void drawArc(SunGraphics2D sg2d, int x, int y, int width, int height, int startAngle, int arcAngle) {
}
public void drawArc(SunGraphics2D sg2d, float x, float y, float width, float height, float startAngle, float arcAngle, int type) {
if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
} else {
if (arcToShape == null) {
synchronized (this) {
if (arcToShape == null) {
}
}
}
synchronized (arcToShape) {
}
}
}
public void fillArc(SunGraphics2D sg2d, int x, int y, int width, int height, int startAngle, int arcAngle) {
}
public void fillArc(SunGraphics2D sg2d, float x, float y, float width, float height, float startAngle, float arcAngle, int type) {
}
native void doPoly(SurfaceData sData, int[] xpoints, int[] ypoints, int npoints, boolean ispolygon, boolean isfill);
if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
} else {
for (int i = 1; i < npoints; i++) {
}
}
}
if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
} else {
for (int i = 1; i < npoints; i++) {
}
}
}
}
native void doShape(SurfaceData sData, int length, FloatBuffer coordinates, IntBuffer types, int windingRule, boolean isfill, boolean shouldApplyOffset);
if (s == null) { throw new NullPointerException(); }
// TODO:
boolean sOptimizeShapes = true;
if (s instanceof Rectangle2D) {
if (isfill) {
} else {
}
} else if (s instanceof Ellipse2D) {
if (isfill) {
} else {
}
} else if (s instanceof Arc2D) {
if (isfill) {
} else {
}
} else if (s instanceof RoundRectangle2D) {
if (isfill) {
} else {
}
} else if (s instanceof Line2D) {
} else if (s instanceof Point2D) {
} else {
if (s instanceof GeneralPath) {
gp = (GeneralPath) s;
} else {
gp = new GeneralPath(s);
}
}
}
} else {
if (s instanceof GeneralPath) {
gp = (GeneralPath) s;
} else {
gp = new GeneralPath(s);
}
}
}
}
if ((sg2d.strokeState != SunGraphics2D.STROKE_CUSTOM) && (OSXSurfaceData.IsSimpleColor(sg2d.paint))) {
drawfillShape(sg2d, s, false, true);
} else {
}
}
drawfillShape(sg2d, s, true, false);
}
native void doImage(SurfaceData sData, SurfaceData img, boolean fliph, boolean flipv, int w, int h, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh);
// Copy img to scaled sg2d @ x,y with width height
public boolean scaleImage(SunGraphics2D sg2d, Image img, int x, int y, int width, int height, Color bgColor) {
int sx = 0;
int sy = 0;
}
// Copy img, clipped to sx1, sy1 by sx2, sy2 to dx1, dy2 by dx2, dy2
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) {
// System.err.println("scaleImage");
// System.err.println(" sx1="+sx1+", sy1="+sy1+", sx2="+sx2+", sy2="+sy2);
// System.err.println(" dx1="+dx1+", dy1="+dy1+", dx2="+dx2+", dy2="+dy2);
boolean srcWidthFlip = false;
boolean srcHeightFlip = false;
boolean dstWidthFlip = false;
boolean dstHeightFlip = false;
} else {
srcWidthFlip = true;
}
} else {
srcHeightFlip = true;
}
} else {
dstWidthFlip = true;
}
} else {
dstHeightFlip = true;
}
}
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) {
OSXOffScreenSurfaceData imgSurfaceData = (OSXOffScreenSurfaceData) OSXOffScreenSurfaceData.createNewSurface((BufferedImage)img);
surfaceData.blitImage(this, sg2d, imgSurfaceData, fliph, flipv, sx, sy, sw, sh, dx, dy, dw, dh, bgColor);
return true;
}
// Copy img to sg2d @ x, y
int sx = 0;
int sy = 0;
}
// Copy img, clipped to sx, sy with width, height to sg2d @ dx, dy
protected boolean copyImage(SunGraphics2D sg2d, Image img, int dx, int dy, int sx, int sy, int width, int height, Color bgColor) {
}
protected void transformImage(SunGraphics2D sg2d, Image img, int x, int y, BufferedImageOp op, AffineTransform xf, Color bgColor) {
// BufferedImageOp can not handle custom images
g.dispose();
} else {
// sun.awt.image.BufImgSurfaceData.createData((BufferedImage)img).finishLazyDrawing();
}
}
} else {
}
} else {
throw new NullPointerException();
}
}
// copied from DrawImage.java
}
return false;
}
return true;
}
// copied from DrawImage.java
public boolean copyImage(SunGraphics2D sg2d, Image img, int x, int y, Color bgColor, ImageObserver observer) {
}
// copied from DrawImage.java
public boolean copyImage(SunGraphics2D sg2d, Image img, int dx, int dy, int sx, int sy, int width, int height, Color bgColor, ImageObserver observer) {
if (!(img instanceof sun.awt.image.ToolkitImage)) { return copyImage(sg2d, img, dx, dy, sx, sy, width, height, bgColor); }
return ir.drawToBufImage(sg2d, sunimg, dx, dy, (dx + width), (dy + height), sx, sy, (sx + width), (sy + height), null, observer);
}
// copied from DrawImage.java
public boolean scaleImage(SunGraphics2D sg2d, Image img, int x, int y, int width, int height, Color bgColor, ImageObserver observer) {
if (!(img instanceof sun.awt.image.ToolkitImage)) { return scaleImage(sg2d, img, x, y, width, height, bgColor); }
}
// copied from DrawImage.java
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) {
if (!(img instanceof sun.awt.image.ToolkitImage)) { return scaleImage(sg2d, img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, bgColor); }
}
// copied from DrawImage.java
public boolean transformImage(SunGraphics2D sg2d, Image img, AffineTransform atfm, ImageObserver observer) {
return true;
}
}
// copied from DrawImage.java
public void transformImage(SunGraphics2D sg2d, BufferedImage img, BufferedImageOp op, int x, int y) {
} else {
throw new NullPointerException();
}
}
return new Tracer();
}
}
}
void doRoundRect(SurfaceData sData, float x, float y, float width, float height, float arcW, float arcH, boolean isfill) {
}
}
void doArc(SurfaceData sData, float x, float y, float width, float height, float angleStart, float angleExtent, int type, boolean isfill) {
}
void doPoly(SurfaceData sData, int[] xpoints, int[] ypoints, int npoints, boolean ispolygon, boolean isfill) {
}
void doShape(SurfaceData sData, int length, FloatBuffer coordinates, IntBuffer types, int windingRule, boolean isfill, boolean shouldApplyOffset) {
}
void doImage(SurfaceData sData, SurfaceData img, boolean fliph, boolean flipv, int w, int h, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh) {
}
}
}