public class FigGraphicsDecorator extends Object implements FigGraphics
Modifier and Type | Field and Description |
---|---|
protected FigGraphics |
mFigGraphics |
Modifier | Constructor and Description |
---|---|
protected |
FigGraphicsDecorator(FigGraphics iFigGraphics) |
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.
|
protected final FigGraphics mFigGraphics
protected FigGraphicsDecorator(FigGraphics iFigGraphics)
public Graphics2D getGraphics()
FigGraphics
getGraphics
in interface FigGraphics
public void setGraphics(Graphics2D iGraphics)
FigGraphics
Details:
FigGraphics.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.
setGraphics
in interface FigGraphics
public FigureView getView()
FigGraphics
getView
in interface FigGraphics
public DetailLevel getDetailLevel()
FigGraphics
getDetailLevel
in interface FigGraphics
public double getScale()
FigGraphics
Details:
FigGraphics.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.
getScale
in interface FigGraphics
public double getRotation()
FigGraphics
Details:
FigGraphics.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.
getRotation
in interface FigGraphics
public void drawOnTop(Doodle iDoodle, AffineTransform iTransform)
FigGraphics
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.
drawOnTop
in interface FigGraphics
iDoodle
- Doodle to drawiTransform
- graphics transform for drawing DoodleCopyright © 2013. All Rights Reserved.