com.nwoods.jgo
Class Graphics2D

java.lang.Object
  extended bycom.nwoods.jgo.Graphics2D

public class Graphics2D
extends java.lang.Object

This exists for compatibility with java.awt.Graphics2D.


Field Summary
 org.eclipse.swt.graphics.Device Device
           
 org.eclipse.swt.graphics.GC GC
           
 
Constructor Summary
Graphics2D(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Device dev)
           
 
Method Summary
static org.eclipse.swt.graphics.RGB brightenRGB(org.eclipse.swt.graphics.RGB x, double factor)
           
static org.eclipse.swt.graphics.RGB darkenRGB(org.eclipse.swt.graphics.RGB x, double factor)
           
 void dispose()
           
 void draw(GeneralPath path)
           
 void draw3DRect(int x, int y, int w, int h, boolean raised)
           
 void drawImage(org.eclipse.swt.graphics.Image img, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh)
           
 void drawLine(int x1, int y1, int x2, int y2)
           
 void drawOval(int x, int y, int w, int h)
           
 void drawPolygon(float[] pts, int npoints)
           
 void drawPolygon(int[] xpoints, int[] ypoints, int npoints)
           
 void drawPolyline(float[] pts, int npoints)
           
 void drawRect(int x, int y, int w, int h)
           
 void drawRoundRect(int x, int y, int w, int h, int arcw, int arch)
           
 void drawString(java.lang.String s, int x, int y)
           
 void drawText(org.eclipse.swt.graphics.TextLayout tl, int x, int y)
           
 void fill(GeneralPath path)
           
 void fill3DRect(int x, int y, int w, int h, boolean raised)
           
 void fillOval(int x, int y, int w, int h)
           
 void fillPolygon(float[] pts, int npoints)
           
 void fillPolygon(int[] xpoints, int[] ypoints, int npoints)
           
 void fillRect(int x, int y, int w, int h)
           
 void fillRoundRect(int x, int y, int w, int h, int arcw, int arch)
           
 org.eclipse.swt.graphics.RGB getColor()
           
 org.eclipse.swt.graphics.Font getFont()
           
 org.eclipse.swt.graphics.FontMetrics getFontMetrics()
           
 org.eclipse.swt.graphics.RGB getPaint()
           
 JGoPen getPen()
           
 void scale(double sx, double sy)
           
 void setColor(org.eclipse.swt.graphics.RGB c)
           
 void setFont(org.eclipse.swt.graphics.Font font)
           
 void setPaint(org.eclipse.swt.graphics.RGB c)
           
 void setPaintMode()
           
 void setPen(JGoPen pen)
           
 void setXORMode(org.eclipse.swt.graphics.RGB c)
           
 void translate(double x, double y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GC

public org.eclipse.swt.graphics.GC GC

Device

public org.eclipse.swt.graphics.Device Device
Constructor Detail

Graphics2D

public Graphics2D(org.eclipse.swt.graphics.GC gc,
                  org.eclipse.swt.graphics.Device dev)
Method Detail

dispose

public void dispose()

translate

public void translate(double x,
                      double y)

getColor

public org.eclipse.swt.graphics.RGB getColor()

setColor

public void setColor(org.eclipse.swt.graphics.RGB c)

setPaintMode

public void setPaintMode()

setXORMode

public void setXORMode(org.eclipse.swt.graphics.RGB c)

getFont

public org.eclipse.swt.graphics.Font getFont()

setFont

public void setFont(org.eclipse.swt.graphics.Font font)

getFontMetrics

public org.eclipse.swt.graphics.FontMetrics getFontMetrics()

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)

drawRect

public void drawRect(int x,
                     int y,
                     int w,
                     int h)

fillRect

public void fillRect(int x,
                     int y,
                     int w,
                     int h)

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int w,
                          int h,
                          int arcw,
                          int arch)

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int w,
                          int h,
                          int arcw,
                          int arch)

brightenRGB

public static org.eclipse.swt.graphics.RGB brightenRGB(org.eclipse.swt.graphics.RGB x,
                                                       double factor)

darkenRGB

public static org.eclipse.swt.graphics.RGB darkenRGB(org.eclipse.swt.graphics.RGB x,
                                                     double factor)

draw3DRect

public void draw3DRect(int x,
                       int y,
                       int w,
                       int h,
                       boolean raised)

fill3DRect

public void fill3DRect(int x,
                       int y,
                       int w,
                       int h,
                       boolean raised)

drawOval

public void drawOval(int x,
                     int y,
                     int w,
                     int h)

fillOval

public void fillOval(int x,
                     int y,
                     int w,
                     int h)

drawPolyline

public void drawPolyline(float[] pts,
                         int npoints)

drawPolygon

public void drawPolygon(int[] xpoints,
                        int[] ypoints,
                        int npoints)

drawPolygon

public void drawPolygon(float[] pts,
                        int npoints)

fillPolygon

public void fillPolygon(int[] xpoints,
                        int[] ypoints,
                        int npoints)

fillPolygon

public void fillPolygon(float[] pts,
                        int npoints)

drawString

public void drawString(java.lang.String s,
                       int x,
                       int y)

drawText

public void drawText(org.eclipse.swt.graphics.TextLayout tl,
                     int x,
                     int y)

drawImage

public void drawImage(org.eclipse.swt.graphics.Image img,
                      int sx,
                      int sy,
                      int sw,
                      int sh,
                      int dx,
                      int dy,
                      int dw,
                      int dh)

draw

public void draw(GeneralPath path)

fill

public void fill(GeneralPath path)

getPaint

public org.eclipse.swt.graphics.RGB getPaint()

setPaint

public void setPaint(org.eclipse.swt.graphics.RGB c)

setPen

public void setPen(JGoPen pen)

getPen

public JGoPen getPen()

scale

public void scale(double sx,
                  double sy)