public interface FigGraphics
Details:
FigGraphics
encapsulates a Graphics2D
graphics context, drawing parameters, and view configuration for rendering a figure.
This is the drawing context provided to the main Doodle
drawing method.
Modifier and Type | Method and Description |
---|---|
void |
drawOnTop(Doodle iDoodle,
AffineTransform iTransform)
Schedules deferred drawing.
|
DetailLevel |
getDetailLevel()
Retrieves DetailLevel property.
|
Graphics2D |
getGraphics()
Retrieves Graphics property.
|
double |
getRotation()
Computes rendering angle.
|
double |
getScale()
Computes rendering scale.
|
FigureView |
getView()
Retrieves View property.
|
void |
setGraphics(Graphics2D iGraphics)
Updates Graphics property.
|
Graphics2D getGraphics()
void setGraphics(Graphics2D iGraphics)
Details:
setGraphics(Graphics2D)
sets the Graphics property to the supplied value.
Extreme care should be taken when using this method, because other Doodle
s may subsequently use this FigGraphics
instance.
iGraphics
- FigureView getView()
DetailLevel getDetailLevel()
double getScale()
Details:
getScale()
computes and returns the magnification at which the figure will be rendered, when using this drawing context.
Sophisticated Doodle
implementations may use this property to adjust the level of detail at which they are rendered, or perhaps even to decide whether they should be rendered at all.
For example, a text Doodle
may choose not to draw itself if it will be too small to read.
double getRotation()
Details:
getRotation()
computes and returns the rotation angle at which the figure will be rendered, when using this drawing context.
Sophisticated Doodle
implementations may use this property to adjust their own drawing angle, so that the Doodle
can be viewed at the same angle regardless of the view.
For example, text Doodle
s may be rendered horizontally regardless of the view's rotation.
void drawOnTop(Doodle iDoodle, AffineTransform iTransform)
Details:
This method schedules the given Doodle
to be drawn after all of the other Doodle
s in the Figure
.
The Doodle
will be drawn using the supplied transform.
Drawing is scheduled on a first-queued, first-drawn basis.
The Z-Doodle
s scheduled for drawing are ignored.
iDoodle
- Doodle to drawiTransform
- graphics transform for drawing DoodleCopyright © 2013. All Rights Reserved.