nodebox.graphics
Class AbstractGraphicsContext

java.lang.Object
  extended by nodebox.graphics.AbstractGraphicsContext
All Implemented Interfaces:
GraphicsContext
Direct Known Subclasses:
CanvasContext, GeometryContext

public abstract class AbstractGraphicsContext
extends Object
implements GraphicsContext


Nested Class Summary
 
Nested classes/interfaces inherited from interface nodebox.graphics.GraphicsContext
GraphicsContext.ArrowType, GraphicsContext.EllipseMode, GraphicsContext.RectMode, GraphicsContext.VarType
 
Field Summary
protected  Text.Align align
           
protected  boolean autoClosePath
           
protected  Color.Mode colorMode
           
protected  double colorRange
           
protected  GraphicsContext.EllipseMode ellipseMode
           
protected  Color fillColor
           
protected  String fontName
           
protected  double fontSize
           
protected  double lineHeight
           
protected  Path path
           
protected  boolean pathClosed
           
protected  GraphicsContext.RectMode rectMode
           
protected  Color strokeColor
           
protected  double strokeWidth
           
protected  Transform transform
           
protected  Transform.Mode transformMode
           
protected  ArrayList<Transform> transformStack
           
 
Fields inherited from interface nodebox.graphics.GraphicsContext
BOOLEAN, CENTER, cm, CMYK, CORNER, CORNERS, FONT, FORTYFIVE, HSB, inch, JUSTIFY, LEFT, mm, NORMAL, NUMBER, RADIUS, RGB, RIGHT, TEXT
 
Constructor Summary
AbstractGraphicsContext()
           
 
Method Summary
protected abstract  void addPath(Path p)
           
protected abstract  void addText(Text t)
           
 Text.Align align()
           
 Text.Align align(int align)
           
 Text.Align align(String align)
           
 Text.Align align(Text.Align align)
           
 Path arrow(double x, double y)
           
 Path arrow(double x, double y, double width)
           
 Path arrow(double x, double y, double width, boolean draw)
           
 Path arrow(double x, double y, double width, GraphicsContext.ArrowType type)
           
 Path arrow(double x, double y, double width, GraphicsContext.ArrowType type, boolean draw)
           
 Path arrow(double x, double y, double width, int type)
           
 Path arrow(double x, double y, double width, int type, boolean draw)
           
 Path arrow(double x, double y, double width, String type)
           
 Path arrow(double x, double y, double width, String type, boolean draw)
           
 Path arrow(double x, double y, GraphicsContext.ArrowType type)
           
 Path arrow(double x, double y, int type)
           
 Path arrow(double x, double y, String type)
           
 boolean autoclosepath()
           
 boolean autoclosepath(boolean c)
           
 void beginclip(Path p)
           
 void beginpath()
           
 void beginpath(double x, double y)
           
 Path BezierPath()
           
 Object choice(List objects)
           
 void closepath()
           
 Color color()
          Create an empty (black) color object.
 Color color(Color c)
          Create a new color with the the given color.
 Color color(double x)
          Create a new color with the given grayscale value.
 Color color(double x, double y)
          Create a new color with the given grayscale and alpha value.
 Color color(double x, double y, double z)
          Create a new color with the the given R/G/B or H/S/B value.
 Color color(double x, double y, double z, double a)
          Create a new color with the the given R/G/B/A or H/S/B/A value.
 Color.Mode colormode()
           
 Color.Mode colormode(Color.Mode mode)
           
 Color.Mode colormode(Color.Mode mode, double range)
           
 Color.Mode colormode(int mode)
           
 Color.Mode colormode(int mode, double range)
           
 Color.Mode colormode(String mode)
           
 Color.Mode colormode(String mode, double range)
           
 double colorrange()
           
 double colorrange(double range)
           
 void curveto(double x1, double y1, double x2, double y2, double x3, double y3)
           
 void draw(Grob g)
           
 void drawpath(Iterable<Point> points)
           
 void drawpath(Path path)
           
 Path ellipse(double x, double y, double width, double height)
           
 Path ellipse(double x, double y, double width, double height, boolean draw)
           
 GraphicsContext.EllipseMode ellipsemode()
           
 GraphicsContext.EllipseMode ellipsemode(GraphicsContext.EllipseMode m)
           
 GraphicsContext.EllipseMode ellipsemode(int m)
           
 GraphicsContext.EllipseMode ellipsemode(String m)
           
 void endclip()
           
 Path endpath()
           
 Path endpath(boolean draw)
           
 Color fill()
          Get the current fill color.
 Color fill(Color c)
          Set the current fill color to the given color.
 Color fill(double x)
          Set the current fill color to given grayscale value.
 Color fill(double x, double y)
          Set the current fill color to given grayscale and alpha value.
 Color fill(double x, double y, double z)
          Set the current fill color to the given R/G/B or H/S/B value.
 Color fill(double x, double y, double z, double a)
          Set the current fill color to the given R/G/B/A or H/S/B/A value.
 Path findpath(List<Point> points)
           
 Path findpath(List<Point> points, double curvature)
           
 Object findVar(String name)
           
 String font()
           
 String font(String fontName)
           
 String font(String fontName, double fontSize)
           
 double fontsize()
           
 double fontsize(double s)
           
 Iterator<Point> grid(double columns, double rows)
           
 Iterator<Point> grid(double columns, double rows, double columnSize, double rowSize)
           
 Iterator<Point> grid(int columns, int rows)
           
 Iterator<Point> grid(int columns, int rows, double columnSize, double rowSize)
           
 Image image(BufferedImage img, double x, double y, double width, double height, double alpha, boolean draw)
           
 Image image(Image img, double x, double y, double width, double height, double alpha, boolean draw)
           
 Image image(String path, double x, double y)
           
 Image image(String path, double x, double y, double width)
           
 Image image(String path, double x, double y, double width, double height)
           
 Image image(String path, double x, double y, double width, double height, boolean draw)
           
 Image image(String path, double x, double y, double width, double height, double alpha)
           
 Image image(String path, double x, double y, double width, double height, double alpha, boolean draw)
           
 Size imagesize(BufferedImage img)
           
 Size imagesize(Image img)
           
 Size imagesize(String path)
           
protected  void inheritFromContext(Path p)
           
protected  void inheritFromContext(Text t)
           
 Path line(double x1, double y1, double x2, double y2)
           
 Path line(double x1, double y1, double x2, double y2, boolean draw)
           
 double lineheight()
           
 double lineheight(double lineHeight)
           
 void lineto(double x, double y)
           
 void moveto(double x, double y)
           
 void nofill()
          Turn off the fill color.
protected  double normalize(double v)
           
 void nostroke()
          Turn off the stroke color.
 String outputmode()
           
 String outputmode(String mode)
           
 Path oval(double x, double y, double width, double height)
           
 Path oval(double x, double y, double width, double height, boolean draw)
           
 Path Path()
           
 void pop()
           
 void push()
           
 double random()
           
 double random(double max)
           
 double random(double min, double max)
           
 long random(int max)
           
 long random(int min, int max)
           
 Path rect(double x, double y, double width, double height)
           
 Path rect(double x, double y, double width, double height, boolean draw)
           
 Path rect(double x, double y, double width, double height, double roundness)
           
 Path rect(double x, double y, double width, double height, double roundness, boolean draw)
           
 Path rect(double x, double y, double width, double height, double rx, double ry)
           
 Path rect(double x, double y, double width, double height, double rx, double ry, boolean draw)
           
 Path rect(Rect r)
           
 Path rect(Rect r, boolean draw)
           
 Path rect(Rect r, double roundness)
           
 Path rect(Rect r, double roundness, boolean draw)
           
 GraphicsContext.RectMode rectmode()
           
 GraphicsContext.RectMode rectmode(GraphicsContext.RectMode m)
           
 GraphicsContext.RectMode rectmode(int m)
           
 GraphicsContext.RectMode rectmode(String m)
           
 void reset()
           
 void resetContext()
           
 void rotate(double r)
           
 void scale(double scale)
           
 void scale(double sx, double sy)
           
 void skew(double skew)
           
 void skew(double kx, double ky)
           
 Path star(double cx, double cy)
           
 Path star(double cx, double cy, int points)
           
 Path star(double cx, double cy, int points, double outer)
           
 Path star(double cx, double cy, int points, double outer, double inner)
           
 Path star(double cx, double cy, int points, double outer, double inner, boolean draw)
           
 Color stroke()
          Get the current stroke color.
 Color stroke(Color c)
          Set the current stroke color to the given color.
 Color stroke(double x)
          Set the current stroke color to given grayscale value.
 Color stroke(double x, double y)
          Set the current stroke color to given grayscale and alpha value.
 Color stroke(double x, double y, double z)
          Set the current stroke color to the given R/G/B or H/S/B value.
 Color stroke(double x, double y, double z, double a)
          Set the current stroke color to the given R/G/B/A or H/S/B/A value.
 double strokewidth()
           
 double strokewidth(double w)
           
 Text text(String text, double x, double y)
           
 Text text(String text, double x, double y, double width)
           
 Text text(String text, double x, double y, double width, double height)
           
 Text text(String text, double x, double y, double width, double height, boolean draw)
           
 double textheight(String text)
           
 double textheight(String text, double width)
           
 Rect textmetrics(String text)
           
 Rect textmetrics(String text, double width)
           
 Rect textmetrics(String text, double width, double height)
           
 Path textpath(String text, double x, double y)
           
 Path textpath(String text, double x, double y, double width)
           
 Path textpath(String text, double x, double y, double width, double height)
           
 double textwidth(String text)
           
 double textwidth(String text, double width)
           
 Transform.Mode transform()
           
 Transform.Mode transform(int mode)
           
 Transform.Mode transform(String mode)
           
 Transform.Mode transform(Transform.Mode mode)
           
 void translate(double tx, double ty)
           
 void var(String name, GraphicsContext.VarType type)
           
 void var(String name, GraphicsContext.VarType type, Object value)
           
 void var(String name, GraphicsContext.VarType type, Object value, double min, double max)
           
 void var(String name, int type)
           
 void var(String name, int type, Object value)
           
 void var(String name, int type, Object value, double min, double max)
           
 void var(String name, String type)
           
 void var(String name, String type, Object value)
           
 void var(String name, String type, Object value, double min, double max)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

colorMode

protected Color.Mode colorMode

colorRange

protected double colorRange

fillColor

protected Color fillColor

strokeColor

protected Color strokeColor

strokeWidth

protected double strokeWidth

path

protected Path path

autoClosePath

protected boolean autoClosePath

pathClosed

protected boolean pathClosed

transformMode

protected Transform.Mode transformMode

transform

protected Transform transform

transformStack

protected ArrayList<Transform> transformStack

fontName

protected String fontName

fontSize

protected double fontSize

lineHeight

protected double lineHeight

align

protected Text.Align align

rectMode

protected GraphicsContext.RectMode rectMode

ellipseMode

protected GraphicsContext.EllipseMode ellipseMode
Constructor Detail

AbstractGraphicsContext

public AbstractGraphicsContext()
Method Detail

resetContext

public void resetContext()

rectmode

public GraphicsContext.RectMode rectmode()
Specified by:
rectmode in interface GraphicsContext

rectmode

public GraphicsContext.RectMode rectmode(GraphicsContext.RectMode m)
Specified by:
rectmode in interface GraphicsContext

rectmode

public GraphicsContext.RectMode rectmode(String m)
Specified by:
rectmode in interface GraphicsContext

rectmode

public GraphicsContext.RectMode rectmode(int m)
Specified by:
rectmode in interface GraphicsContext

Path

public Path Path()

BezierPath

public Path BezierPath()

rect

public Path rect(Rect r)
Specified by:
rect in interface GraphicsContext

rect

public Path rect(Rect r,
                 boolean draw)

rect

public Path rect(double x,
                 double y,
                 double width,
                 double height)
Specified by:
rect in interface GraphicsContext

rect

public Path rect(double x,
                 double y,
                 double width,
                 double height,
                 boolean draw)

rect

public Path rect(Rect r,
                 double roundness)
Specified by:
rect in interface GraphicsContext

rect

public Path rect(Rect r,
                 double roundness,
                 boolean draw)

rect

public Path rect(double x,
                 double y,
                 double width,
                 double height,
                 double roundness)
Specified by:
rect in interface GraphicsContext

rect

public Path rect(double x,
                 double y,
                 double width,
                 double height,
                 double roundness,
                 boolean draw)

rect

public Path rect(double x,
                 double y,
                 double width,
                 double height,
                 double rx,
                 double ry)
Specified by:
rect in interface GraphicsContext

rect

public Path rect(double x,
                 double y,
                 double width,
                 double height,
                 double rx,
                 double ry,
                 boolean draw)

ellipsemode

public GraphicsContext.EllipseMode ellipsemode()
Specified by:
ellipsemode in interface GraphicsContext

ellipsemode

public GraphicsContext.EllipseMode ellipsemode(GraphicsContext.EllipseMode m)
Specified by:
ellipsemode in interface GraphicsContext

ellipsemode

public GraphicsContext.EllipseMode ellipsemode(String m)
Specified by:
ellipsemode in interface GraphicsContext

ellipsemode

public GraphicsContext.EllipseMode ellipsemode(int m)
Specified by:
ellipsemode in interface GraphicsContext

oval

public Path oval(double x,
                 double y,
                 double width,
                 double height)
Specified by:
oval in interface GraphicsContext

oval

public Path oval(double x,
                 double y,
                 double width,
                 double height,
                 boolean draw)
Specified by:
oval in interface GraphicsContext

ellipse

public Path ellipse(double x,
                    double y,
                    double width,
                    double height)
Specified by:
ellipse in interface GraphicsContext

ellipse

public Path ellipse(double x,
                    double y,
                    double width,
                    double height,
                    boolean draw)
Specified by:
ellipse in interface GraphicsContext

line

public Path line(double x1,
                 double y1,
                 double x2,
                 double y2)
Specified by:
line in interface GraphicsContext

line

public Path line(double x1,
                 double y1,
                 double x2,
                 double y2,
                 boolean draw)
Specified by:
line in interface GraphicsContext

star

public Path star(double cx,
                 double cy)
Specified by:
star in interface GraphicsContext

star

public Path star(double cx,
                 double cy,
                 int points)
Specified by:
star in interface GraphicsContext

star

public Path star(double cx,
                 double cy,
                 int points,
                 double outer)
Specified by:
star in interface GraphicsContext

star

public Path star(double cx,
                 double cy,
                 int points,
                 double outer,
                 double inner)
Specified by:
star in interface GraphicsContext

star

public Path star(double cx,
                 double cy,
                 int points,
                 double outer,
                 double inner,
                 boolean draw)
Specified by:
star in interface GraphicsContext

arrow

public Path arrow(double x,
                  double y)
Specified by:
arrow in interface GraphicsContext

arrow

public Path arrow(double x,
                  double y,
                  GraphicsContext.ArrowType type)
Specified by:
arrow in interface GraphicsContext

arrow

public Path arrow(double x,
                  double y,
                  String type)
Specified by:
arrow in interface GraphicsContext

arrow

public Path arrow(double x,
                  double y,
                  int type)
Specified by:
arrow in interface GraphicsContext

arrow

public Path arrow(double x,
                  double y,
                  double width)
Specified by:
arrow in interface GraphicsContext

arrow

public Path arrow(double x,
                  double y,
                  double width,
                  boolean draw)
Specified by:
arrow in interface GraphicsContext

arrow

public Path arrow(double x,
                  double y,
                  double width,
                  GraphicsContext.ArrowType type)
Specified by:
arrow in interface GraphicsContext

arrow

public Path arrow(double x,
                  double y,
                  double width,
                  String type)
Specified by:
arrow in interface GraphicsContext

arrow

public Path arrow(double x,
                  double y,
                  double width,
                  int type)
Specified by:
arrow in interface GraphicsContext

arrow

public Path arrow(double x,
                  double y,
                  double width,
                  String type,
                  boolean draw)
Specified by:
arrow in interface GraphicsContext

arrow

public Path arrow(double x,
                  double y,
                  double width,
                  int type,
                  boolean draw)
Specified by:
arrow in interface GraphicsContext

arrow

public Path arrow(double x,
                  double y,
                  double width,
                  GraphicsContext.ArrowType type,
                  boolean draw)
Specified by:
arrow in interface GraphicsContext

beginpath

public void beginpath()
Specified by:
beginpath in interface GraphicsContext

beginpath

public void beginpath(double x,
                      double y)
Specified by:
beginpath in interface GraphicsContext

moveto

public void moveto(double x,
                   double y)
Specified by:
moveto in interface GraphicsContext

lineto

public void lineto(double x,
                   double y)
Specified by:
lineto in interface GraphicsContext

curveto

public void curveto(double x1,
                    double y1,
                    double x2,
                    double y2,
                    double x3,
                    double y3)
Specified by:
curveto in interface GraphicsContext

closepath

public void closepath()
Specified by:
closepath in interface GraphicsContext

endpath

public Path endpath()
Specified by:
endpath in interface GraphicsContext

endpath

public Path endpath(boolean draw)
Specified by:
endpath in interface GraphicsContext

drawpath

public void drawpath(Path path)
Specified by:
drawpath in interface GraphicsContext

drawpath

public void drawpath(Iterable<Point> points)
Specified by:
drawpath in interface GraphicsContext

autoclosepath

public boolean autoclosepath()
Specified by:
autoclosepath in interface GraphicsContext

autoclosepath

public boolean autoclosepath(boolean c)
Specified by:
autoclosepath in interface GraphicsContext

findpath

public Path findpath(List<Point> points)
Specified by:
findpath in interface GraphicsContext

findpath

public Path findpath(List<Point> points,
                     double curvature)
Specified by:
findpath in interface GraphicsContext

beginclip

public void beginclip(Path p)
Specified by:
beginclip in interface GraphicsContext

endclip

public void endclip()
Specified by:
endclip in interface GraphicsContext

transform

public Transform.Mode transform()
Specified by:
transform in interface GraphicsContext

transform

public Transform.Mode transform(Transform.Mode mode)
Specified by:
transform in interface GraphicsContext

transform

public Transform.Mode transform(String mode)
Specified by:
transform in interface GraphicsContext

transform

public Transform.Mode transform(int mode)
Specified by:
transform in interface GraphicsContext

push

public void push()
Specified by:
push in interface GraphicsContext

pop

public void pop()
Specified by:
pop in interface GraphicsContext

reset

public void reset()
Specified by:
reset in interface GraphicsContext

translate

public void translate(double tx,
                      double ty)
Specified by:
translate in interface GraphicsContext

rotate

public void rotate(double r)
Specified by:
rotate in interface GraphicsContext

scale

public void scale(double scale)
Specified by:
scale in interface GraphicsContext

scale

public void scale(double sx,
                  double sy)
Specified by:
scale in interface GraphicsContext

skew

public void skew(double skew)
Specified by:
skew in interface GraphicsContext

skew

public void skew(double kx,
                 double ky)
Specified by:
skew in interface GraphicsContext

outputmode

public String outputmode()
Specified by:
outputmode in interface GraphicsContext

outputmode

public String outputmode(String mode)
Specified by:
outputmode in interface GraphicsContext

colormode

public Color.Mode colormode()
Specified by:
colormode in interface GraphicsContext

colormode

public Color.Mode colormode(Color.Mode mode)
Specified by:
colormode in interface GraphicsContext

colormode

public Color.Mode colormode(Color.Mode mode,
                            double range)
Specified by:
colormode in interface GraphicsContext

colormode

public Color.Mode colormode(String mode)
Specified by:
colormode in interface GraphicsContext

colormode

public Color.Mode colormode(String mode,
                            double range)
Specified by:
colormode in interface GraphicsContext

colormode

public Color.Mode colormode(int mode)
Specified by:
colormode in interface GraphicsContext

colormode

public Color.Mode colormode(int mode,
                            double range)
Specified by:
colormode in interface GraphicsContext

colorrange

public double colorrange()
Specified by:
colorrange in interface GraphicsContext

colorrange

public double colorrange(double range)
Specified by:
colorrange in interface GraphicsContext

color

public Color color()
Create an empty (black) color object.

Specified by:
color in interface GraphicsContext
Returns:
the new color.

color

public Color color(double x)
Create a new color with the given grayscale value.

Specified by:
color in interface GraphicsContext
Parameters:
x - the gray component.
Returns:
the new color.

color

public Color color(double x,
                   double y)
Create a new color with the given grayscale and alpha value.

Specified by:
color in interface GraphicsContext
Parameters:
x - the grayscale value.
y - the alpha value.
Returns:
the new color.

color

public Color color(double x,
                   double y,
                   double z)
Create a new color with the the given R/G/B or H/S/B value.

Specified by:
color in interface GraphicsContext
Parameters:
x - the red or hue component.
y - the green or saturation component.
z - the blue or brightness component.
Returns:
the new color.

color

public Color color(double x,
                   double y,
                   double z,
                   double a)
Create a new color with the the given R/G/B/A or H/S/B/A value.

Specified by:
color in interface GraphicsContext
Parameters:
x - the red or hue component.
y - the green or saturation component.
z - the blue or brightness component.
a - the alpha component.
Returns:
the new color.

color

public Color color(Color c)
Create a new color with the the given color.

The color object is cloned; you can change the original afterwards. If the color object is null, the new color is turned off (same as nocolor).

Specified by:
color in interface GraphicsContext
Parameters:
c - the color object.
Returns:
the new color.

fill

public Color fill()
Get the current fill color.

Specified by:
fill in interface GraphicsContext
Returns:
the current fill color.

fill

public Color fill(double x)
Set the current fill color to given grayscale value.

Specified by:
fill in interface GraphicsContext
Parameters:
x - the gray component.
Returns:
the current fill color.

fill

public Color fill(double x,
                  double y)
Set the current fill color to given grayscale and alpha value.

Specified by:
fill in interface GraphicsContext
Parameters:
x - the grayscale value.
y - the alpha value.
Returns:
the current fill color.

fill

public Color fill(double x,
                  double y,
                  double z)
Set the current fill color to the given R/G/B or H/S/B value.

Specified by:
fill in interface GraphicsContext
Parameters:
x - the red or hue component.
y - the green or saturation component.
z - the blue or brightness component.
Returns:
the current fill color.

fill

public Color fill(double x,
                  double y,
                  double z,
                  double a)
Set the current fill color to the given R/G/B/A or H/S/B/A value.

Specified by:
fill in interface GraphicsContext
Parameters:
x - the red or hue component.
y - the green or saturation component.
z - the blue or brightness component.
a - the alpha component.
Returns:
the current fill color.

fill

public Color fill(Color c)
Set the current fill color to the given color.

The color object is cloned; you can change the original afterwards. If the color object is null, the current fill color is turned off (same as nofill).

Specified by:
fill in interface GraphicsContext
Parameters:
c - the color object.
Returns:
the current fill color.

nofill

public void nofill()
Description copied from interface: GraphicsContext
Turn off the fill color.

Specified by:
nofill in interface GraphicsContext

stroke

public Color stroke()
Get the current stroke color.

Specified by:
stroke in interface GraphicsContext
Returns:
the current stroke color.

stroke

public Color stroke(double x)
Set the current stroke color to given grayscale value.

Specified by:
stroke in interface GraphicsContext
Parameters:
x - the gray component.
Returns:
the current stroke color.

stroke

public Color stroke(double x,
                    double y)
Set the current stroke color to given grayscale and alpha value.

Specified by:
stroke in interface GraphicsContext
Parameters:
x - the grayscale value.
y - the alpha value.
Returns:
the current stroke color.

stroke

public Color stroke(double x,
                    double y,
                    double z)
Set the current stroke color to the given R/G/B or H/S/B value.

Specified by:
stroke in interface GraphicsContext
Parameters:
x - the red or hue component.
y - the green or saturation component.
z - the blue or brightness component.
Returns:
the current stroke color.

stroke

public Color stroke(double x,
                    double y,
                    double z,
                    double a)
Set the current stroke color to the given R/G/B/A or H/S/B/A value.

Specified by:
stroke in interface GraphicsContext
Parameters:
x - the red or hue component.
y - the green or saturation component.
z - the blue or brightness component.
a - the alpha component.
Returns:
the current stroke color.

stroke

public Color stroke(Color c)
Set the current stroke color to the given color.

The color object is cloned; you can change the original afterwards. If the color object is null, the current stroke color is turned off (same as nostroke).

Specified by:
stroke in interface GraphicsContext
Parameters:
c - the color object.
Returns:
the current stroke color.

nostroke

public void nostroke()
Description copied from interface: GraphicsContext
Turn off the stroke color.

Specified by:
nostroke in interface GraphicsContext

strokewidth

public double strokewidth()
Specified by:
strokewidth in interface GraphicsContext

strokewidth

public double strokewidth(double w)
Specified by:
strokewidth in interface GraphicsContext

image

public Image image(String path,
                   double x,
                   double y)
Specified by:
image in interface GraphicsContext

image

public Image image(String path,
                   double x,
                   double y,
                   double width)
Specified by:
image in interface GraphicsContext

image

public Image image(String path,
                   double x,
                   double y,
                   double width,
                   double height)
Specified by:
image in interface GraphicsContext

image

public Image image(String path,
                   double x,
                   double y,
                   double width,
                   double height,
                   double alpha)
Specified by:
image in interface GraphicsContext

image

public Image image(String path,
                   double x,
                   double y,
                   double width,
                   double height,
                   boolean draw)
Specified by:
image in interface GraphicsContext

image

public Image image(String path,
                   double x,
                   double y,
                   double width,
                   double height,
                   double alpha,
                   boolean draw)
Specified by:
image in interface GraphicsContext

image

public Image image(Image img,
                   double x,
                   double y,
                   double width,
                   double height,
                   double alpha,
                   boolean draw)
Specified by:
image in interface GraphicsContext

image

public Image image(BufferedImage img,
                   double x,
                   double y,
                   double width,
                   double height,
                   double alpha,
                   boolean draw)
Specified by:
image in interface GraphicsContext

imagesize

public Size imagesize(String path)
Specified by:
imagesize in interface GraphicsContext

imagesize

public Size imagesize(Image img)
Specified by:
imagesize in interface GraphicsContext

imagesize

public Size imagesize(BufferedImage img)
Specified by:
imagesize in interface GraphicsContext

font

public String font()
Specified by:
font in interface GraphicsContext

font

public String font(String fontName)
Specified by:
font in interface GraphicsContext

font

public String font(String fontName,
                   double fontSize)
Specified by:
font in interface GraphicsContext

fontsize

public double fontsize()
Specified by:
fontsize in interface GraphicsContext

fontsize

public double fontsize(double s)
Specified by:
fontsize in interface GraphicsContext

lineheight

public double lineheight()
Specified by:
lineheight in interface GraphicsContext

lineheight

public double lineheight(double lineHeight)
Specified by:
lineheight in interface GraphicsContext

align

public Text.Align align()
Specified by:
align in interface GraphicsContext

align

public Text.Align align(Text.Align align)
Specified by:
align in interface GraphicsContext

align

public Text.Align align(String align)
Specified by:
align in interface GraphicsContext

align

public Text.Align align(int align)
Specified by:
align in interface GraphicsContext

text

public Text text(String text,
                 double x,
                 double y)
Specified by:
text in interface GraphicsContext

text

public Text text(String text,
                 double x,
                 double y,
                 double width)
Specified by:
text in interface GraphicsContext

text

public Text text(String text,
                 double x,
                 double y,
                 double width,
                 double height)
Specified by:
text in interface GraphicsContext

text

public Text text(String text,
                 double x,
                 double y,
                 double width,
                 double height,
                 boolean draw)
Specified by:
text in interface GraphicsContext

textpath

public Path textpath(String text,
                     double x,
                     double y)
Specified by:
textpath in interface GraphicsContext

textpath

public Path textpath(String text,
                     double x,
                     double y,
                     double width)
Specified by:
textpath in interface GraphicsContext

textpath

public Path textpath(String text,
                     double x,
                     double y,
                     double width,
                     double height)
Specified by:
textpath in interface GraphicsContext

textmetrics

public Rect textmetrics(String text)
Specified by:
textmetrics in interface GraphicsContext

textmetrics

public Rect textmetrics(String text,
                        double width)
Specified by:
textmetrics in interface GraphicsContext

textmetrics

public Rect textmetrics(String text,
                        double width,
                        double height)
Specified by:
textmetrics in interface GraphicsContext

textwidth

public double textwidth(String text)
Specified by:
textwidth in interface GraphicsContext

textwidth

public double textwidth(String text,
                        double width)
Specified by:
textwidth in interface GraphicsContext

textheight

public double textheight(String text)
Specified by:
textheight in interface GraphicsContext

textheight

public double textheight(String text,
                         double width)
Specified by:
textheight in interface GraphicsContext

var

public void var(String name,
                GraphicsContext.VarType type)
Specified by:
var in interface GraphicsContext

var

public void var(String name,
                String type)
Specified by:
var in interface GraphicsContext

var

public void var(String name,
                int type)
Specified by:
var in interface GraphicsContext

var

public void var(String name,
                GraphicsContext.VarType type,
                Object value)
Specified by:
var in interface GraphicsContext

var

public void var(String name,
                String type,
                Object value)
Specified by:
var in interface GraphicsContext

var

public void var(String name,
                int type,
                Object value)
Specified by:
var in interface GraphicsContext

var

public void var(String name,
                String type,
                Object value,
                double min,
                double max)
Specified by:
var in interface GraphicsContext

var

public void var(String name,
                int type,
                Object value,
                double min,
                double max)
Specified by:
var in interface GraphicsContext

var

public void var(String name,
                GraphicsContext.VarType type,
                Object value,
                double min,
                double max)
Specified by:
var in interface GraphicsContext

findVar

public Object findVar(String name)
Specified by:
findVar in interface GraphicsContext

normalize

protected double normalize(double v)

random

public double random()
Specified by:
random in interface GraphicsContext

random

public long random(int max)
Specified by:
random in interface GraphicsContext

random

public long random(int min,
                   int max)
Specified by:
random in interface GraphicsContext

random

public double random(double max)
Specified by:
random in interface GraphicsContext

random

public double random(double min,
                     double max)
Specified by:
random in interface GraphicsContext

choice

public Object choice(List objects)
Specified by:
choice in interface GraphicsContext

grid

public Iterator<Point> grid(int columns,
                            int rows)
Specified by:
grid in interface GraphicsContext

grid

public Iterator<Point> grid(double columns,
                            double rows)

grid

public Iterator<Point> grid(double columns,
                            double rows,
                            double columnSize,
                            double rowSize)

grid

public Iterator<Point> grid(int columns,
                            int rows,
                            double columnSize,
                            double rowSize)
Specified by:
grid in interface GraphicsContext

draw

public void draw(Grob g)
Specified by:
draw in interface GraphicsContext

addPath

protected abstract void addPath(Path p)

addText

protected abstract void addText(Text t)

inheritFromContext

protected void inheritFromContext(Path p)

inheritFromContext

protected void inheritFromContext(Text t)


Copyright © 2013. All Rights Reserved.