|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface GraphicsContext
| Nested Class Summary | |
|---|---|
static class |
GraphicsContext.ArrowType
|
static class |
GraphicsContext.EllipseMode
|
static class |
GraphicsContext.RectMode
|
static class |
GraphicsContext.VarType
|
| Field Summary | |
|---|---|
static String |
BOOLEAN
|
static String |
CENTER
|
static double |
cm
|
static String |
CMYK
|
static String |
CORNER
|
static String |
CORNERS
|
static String |
FONT
|
static String |
FORTYFIVE
|
static String |
HSB
|
static double |
inch
|
static String |
JUSTIFY
|
static String |
LEFT
|
static double |
mm
|
static String |
NORMAL
|
static String |
NUMBER
|
static String |
RADIUS
|
static String |
RGB
|
static String |
RIGHT
|
static String |
TEXT
|
| Method Summary | |
|---|---|
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)
|
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 value. |
Color |
color(double x,
double y,
double z,
double a)
Create a new color with the the given R/G/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 value. |
Color |
fill(double x,
double y,
double z,
double a)
Set the current fill color to the given R/G/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(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)
|
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. |
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)
|
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,
double roundness)
|
Path |
rect(double x,
double y,
double width,
double height,
double rx,
double ry)
|
Path |
rect(Rect r)
|
Path |
rect(Rect r,
double roundness)
|
GraphicsContext.RectMode |
rectmode()
|
GraphicsContext.RectMode |
rectmode(GraphicsContext.RectMode m)
|
GraphicsContext.RectMode |
rectmode(int m)
|
GraphicsContext.RectMode |
rectmode(String m)
|
void |
reset()
|
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 value. |
Color |
stroke(double x,
double y,
double z,
double a)
Set the current stroke color to the given R/G/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)
|
| Field Detail |
|---|
static final double inch
static final double cm
static final double mm
static final String CORNER
static final String CENTER
static final String CORNERS
static final String RADIUS
static final String LEFT
static final String RIGHT
static final String JUSTIFY
static final String RGB
static final String HSB
static final String CMYK
static final String NUMBER
static final String TEXT
static final String BOOLEAN
static final String FONT
static final String NORMAL
static final String FORTYFIVE
| Method Detail |
|---|
GraphicsContext.RectMode rectmode()
GraphicsContext.RectMode rectmode(GraphicsContext.RectMode m)
GraphicsContext.RectMode rectmode(String m)
GraphicsContext.RectMode rectmode(int m)
Path rect(Rect r)
Path rect(double x,
double y,
double width,
double height)
Path rect(Rect r,
double roundness)
Path rect(double x,
double y,
double width,
double height,
double roundness)
Path rect(double x,
double y,
double width,
double height,
double rx,
double ry)
GraphicsContext.EllipseMode ellipsemode()
GraphicsContext.EllipseMode ellipsemode(GraphicsContext.EllipseMode m)
GraphicsContext.EllipseMode ellipsemode(String m)
GraphicsContext.EllipseMode ellipsemode(int m)
Path oval(double x,
double y,
double width,
double height)
Path oval(double x,
double y,
double width,
double height,
boolean draw)
Path ellipse(double x,
double y,
double width,
double height)
Path ellipse(double x,
double y,
double width,
double height,
boolean draw)
Path line(double x1,
double y1,
double x2,
double y2)
Path line(double x1,
double y1,
double x2,
double y2,
boolean draw)
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)
Path arrow(double x,
double y)
Path arrow(double x,
double y,
GraphicsContext.ArrowType type)
Path arrow(double x,
double y,
String type)
Path arrow(double x,
double y,
int type)
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,
String type)
Path arrow(double x,
double y,
double width,
int type)
Path arrow(double x,
double y,
double width,
GraphicsContext.ArrowType type,
boolean draw)
Path arrow(double x,
double y,
double width,
String type,
boolean draw)
Path arrow(double x,
double y,
double width,
int type,
boolean draw)
void beginpath()
void beginpath(double x,
double y)
void moveto(double x,
double y)
void lineto(double x,
double y)
void curveto(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
void closepath()
Path endpath()
Path endpath(boolean draw)
void drawpath(Path path)
void drawpath(Iterable<Point> points)
boolean autoclosepath()
boolean autoclosepath(boolean c)
Path findpath(List<Point> points)
Path findpath(List<Point> points,
double curvature)
void beginclip(Path p)
void endclip()
Transform.Mode transform()
Transform.Mode transform(Transform.Mode mode)
Transform.Mode transform(int mode)
Transform.Mode transform(String mode)
void push()
void pop()
void reset()
void translate(double tx,
double ty)
void rotate(double r)
void scale(double scale)
void scale(double sx,
double sy)
void skew(double skew)
void skew(double kx,
double ky)
String outputmode()
String outputmode(String mode)
Color.Mode colormode()
Color.Mode colormode(Color.Mode mode)
Color.Mode colormode(Color.Mode mode,
double range)
Color.Mode colormode(String mode)
Color.Mode colormode(String mode,
double range)
Color.Mode colormode(int mode)
Color.Mode colormode(int mode,
double range)
double colorrange()
double colorrange(double range)
Color color()
Color color(double x)
x - the gray component.
Color color(double x,
double y)
x - the grayscale value.y - the alpha value.
Color color(double x,
double y,
double z)
x - the red component.y - the green component.z - the blue component.
Color color(double x,
double y,
double z,
double a)
x - the red component.y - the green component.z - the blue component.a - the alpha component.
Color color(Color c)
c - the color object.
Color fill()
Color fill(double x)
x - the gray component.
Color fill(double x,
double y)
x - the grayscale value.y - the alpha value.
Color fill(double x,
double y,
double z)
x - the red component.y - the green component.z - the blue component.
Color fill(double x,
double y,
double z,
double a)
x - the red component.y - the green component.z - the blue component.a - the alpha component.
Color fill(Color c)
c - the color object.
void nofill()
Color stroke()
Color stroke(double x)
x - the gray component.
Color stroke(double x,
double y)
x - the grayscale value.y - the alpha value.
Color stroke(double x,
double y,
double z)
x - the red component.y - the green component.z - the blue component.
Color stroke(double x,
double y,
double z,
double a)
x - the red component.y - the green component.z - the blue component.a - the alpha component.
Color stroke(Color c)
c - the color object.
void nostroke()
double strokewidth()
double strokewidth(double w)
String font()
String font(String fontName)
String font(String fontName,
double fontSize)
double fontsize()
double fontsize(double s)
double lineheight()
double lineheight(double lineHeight)
Text.Align align()
Text.Align align(Text.Align align)
Text.Align align(String align)
Text.Align align(int align)
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,
double alpha)
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,
boolean draw)
Image image(Image img,
double x,
double y,
double width,
double height,
double alpha,
boolean draw)
Image image(BufferedImage img,
double x,
double y,
double width,
double height,
double alpha,
boolean draw)
Size imagesize(String path)
Size imagesize(Image img)
Size imagesize(BufferedImage img)
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)
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)
Rect textmetrics(String text)
Rect textmetrics(String text,
double width)
Rect textmetrics(String text,
double width,
double height)
double textwidth(String text)
double textwidth(String text,
double width)
double textheight(String text)
double textheight(String text,
double width)
void var(String name,
GraphicsContext.VarType type)
void var(String name,
String type)
void var(String name,
int type)
void var(String name,
GraphicsContext.VarType type,
Object value)
void var(String name,
String type,
Object value)
void var(String name,
int type,
Object value)
void var(String name,
GraphicsContext.VarType type,
Object value,
double min,
double max)
void var(String name,
String type,
Object value,
double min,
double max)
void var(String name,
int type,
Object value,
double min,
double max)
Object findVar(String name)
double random()
long random(int max)
long random(int min,
int max)
double random(double max)
double random(double min,
double max)
Object choice(List objects)
Iterator<Point> grid(int columns,
int rows)
Iterator<Point> grid(int columns,
int rows,
double columnSize,
double rowSize)
void draw(Grob g)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||