|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface VectorGraphics
Vector graphics interface (scalable atomic 2D drawing commands).
VectorCommand,
VCommand| Field Summary |
|---|
| Fields inherited from interface cz.cuni.jagrlib.iface.Property |
|---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
| Method Summary | |
|---|---|
void |
arcTo(double x,
double y,
double r,
double alpha,
double beta)
ArcTo(x,y,r,alpha,beta) command. |
void |
clip()
Clip command. |
void |
close()
Close the current vector-command stream. |
void |
closePath()
ClosePath command. |
void |
command(VectorCommand c)
Single command processing. |
void |
commands(java.util.Iterator<VectorCommand> c)
Multiple command processing. |
void |
commands(VectorCommand[] c)
Multiple command processing. |
int |
createFont(java.lang.String name,
int style,
double size)
Creates a new font and places it in slot A (actual, working font). |
void |
cubicCurveTo(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
CubicCurveTo(x1,y1,x2,y2,x3,y3) command. |
void |
drawText(java.lang.String text,
TextRender.TextExtent ext)
Draws the given text. |
void |
fill()
Fill command. |
double |
fontOrientation(double angle)
Changes the actual font's orientation. |
int |
fontProperties()
Returns properties (flags) of the actual font (slot A). |
void |
getFont(int slot)
Assigns the actual font (slot A) from the given slot. |
TextRender.TextExtent |
getKern(char c1,
char c2,
TextRender.TextExtent ext)
Returns the kerning (space correction) which should be used between two given characters. |
void |
lineTo(double x,
double y)
LineTo(x,y) command. |
void |
moveTo(double x,
double y)
MoveTo(x,y) command. |
void |
newPath()
NewPath command. |
void |
open()
Interface (re-)initialization (new vector-command stream will be produced). |
void |
popPath()
PopPath command. |
void |
pushPath()
PushPath command. |
void |
putFont(int slot)
Puts the actual font (slot A) into the given slot. |
void |
rArcTo(double x,
double y,
double r,
double alpha,
double beta)
RArcTo(x,y,r,alpha,beta) command. |
void |
setColor(double[] color)
SetColor command. |
void |
setFillCallback(FillCallback callback)
SetFillCallback command. |
void |
setFillStyle(int style)
SetFillStyle command. |
void |
setLineCallback(StrokeCallback callback)
SetLineCallback command. |
void |
setLineStyle(int style)
SetLineStyle command. |
void |
setLineWidth(double width)
SetLineWidth command. |
void |
stroke()
Stroke command. |
TextRender.TextExtent |
textExtent(java.lang.String text,
TextRender.TextExtent ext)
Computes the extent of the given text string (without any output change). |
void |
textPath(java.lang.String text)
Generates path of the given text string and appends it to the current path. |
| Methods inherited from interface cz.cuni.jagrlib.iface.Property |
|---|
commit, get, set |
| Method Detail |
|---|
void open()
void close()
void newPath()
VCommand.NewPath
void moveTo(double x,
double y)
x - X coordinate.y - Y coordinate.VCommand.MoveTo
void lineTo(double x,
double y)
x - X coordinate.y - Y coordinate.VCommand.LineTo
void arcTo(double x,
double y,
double r,
double alpha,
double beta)
x - X coordinate of arc center.y - Y coordinate of arc center.r - Arc radius.alpha - Starting angle in degrees.beta - Finishing angle in degrees.VCommand.ArcTo
void rArcTo(double x,
double y,
double r,
double alpha,
double beta)
x - X coordinate of arc center.y - Y coordinate of arc center.r - Arc radius.alpha - Starting angle in degrees.beta - Finishing angle in degrees.VCommand.RArcTo
void cubicCurveTo(double x1,
double y1,
double x2,
double y2,
double x3,
double y3)
x1 - X coordinate of the 2nd control point.y1 - Y coordinate of the 2nd control point.x2 - X coordinate of the 3rd control point.y2 - Y coordinate of the 3rd control point.x3 - X coordinate of the 4th control point.y3 - Y coordinate of the 4th control point.VCommand.CubicCurveTovoid closePath()
VCommand.ClosePathvoid stroke()
VCommand.Strokevoid fill()
VCommand.Fillvoid clip()
VCommand.Clipvoid pushPath()
VCommand.PushPathvoid popPath()
VCommand.PopPathvoid setColor(double[] color)
color - New actual color in Gr[A] or RGB[A] format.VCommand.SetColorvoid setLineWidth(double width)
width - New line width.VCommand.SetLineWidthvoid setLineStyle(int style)
style - New line style: use VectorCommand.LINE_* constant.VCommand.SetLineStyle,
VectorCommand.LINE_SOLIDvoid setFillStyle(int style)
style - New fill style: use VectorCommand.FILL_* constant.VCommand.SetFillStyle,
VectorCommand.FILL_SOLIDvoid setLineCallback(StrokeCallback callback)
callback - Line callback object.VCommand.SetLineStyle,
VCommand.SetLineCallback,
VectorCommand.LINE_CALLBACKvoid setFillCallback(FillCallback callback)
callback - File callback object.VCommand.SetFillStyle,
VCommand.SetFillCallback,
VectorCommand.FILL_CALLBACK
int createFont(java.lang.String name,
int style,
double size)
name - Font name.style - Font style - used if exact font match was not successful
(bitwise OR of TextRender.FONT_* constants).size - Font size (distance between two regularly spaced text lines).
TextRender.CREATE_* constants).TextRender.FONT_BOLD,
TextRender.CREATE_EXACT,
VCommand.CreateFontdouble fontOrientation(double angle)
angle - New font orientation (in degrees, counterclockwise).
VCommand.FontOrientationvoid getFont(int slot)
slot - Slot number (between 0 and TextRender.MAX_SLOT-1).TextRender.MAX_SLOT,
VCommand.GetFontvoid putFont(int slot)
slot - Slot number (between 0 and TextRender.MAX_SLOT-1).TextRender.MAX_SLOT,
VCommand.PutFontint fontProperties()
TextRender.PROP_* constants.TextRender.PROP_STROKEvoid textPath(java.lang.String text)
Does nothing if the actual font has neither TextRender.PROP_STROKE nor
TextRender.PROP_FILL capability.
text - The string to be drawn.VCommand.TextPath,
textExtent(java.lang.String, cz.cuni.jagrlib.iface.TextRender.TextExtent),
drawText(java.lang.String, cz.cuni.jagrlib.iface.TextRender.TextExtent),
VCommand.MoveTo,
moveTo(double, double)
void drawText(java.lang.String text,
TextRender.TextExtent ext)
ext parameter is not null, the routine fills
the given TextRender.TextExtent object.
Works with both vector and bitmap fonts.
text - The string to be drawn.ext - The TextRender.TextExtent object to be filled (or null).TextRender.TextExtent,
textExtent(java.lang.String, cz.cuni.jagrlib.iface.TextRender.TextExtent),
VCommand.DrawText
TextRender.TextExtent textExtent(java.lang.String text,
TextRender.TextExtent ext)
text - The string to be drawn.ext - The TextRender.TextExtent object to be filled (or null).
TextRender.TextExtent object.TextRender.TextExtent,
drawText(java.lang.String, cz.cuni.jagrlib.iface.TextRender.TextExtent)
TextRender.TextExtent getKern(char c1,
char c2,
TextRender.TextExtent ext)
c1 - First character.c2 - Second character.ext - The TextRender.TextExtent object to be filled (or null).
TextRender.TextExtent object (only dx and
dy are used).TextRender.TextExtent,
textExtent(java.lang.String, cz.cuni.jagrlib.iface.TextRender.TextExtent)void command(VectorCommand c)
commands(VectorCommand[]),
commands(Iterator)void commands(VectorCommand[] c)
command(VectorCommand),
commands(Iterator)void commands(java.util.Iterator<VectorCommand> c)
command(VectorCommand),
commands(VectorCommand[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||