Package de.intarsys.cwt.awt.environment
Class CwtAwtGraphicsContext
java.lang.Object
de.intarsys.cwt.awt.environment.CwtAwtGraphicsContext
- All Implemented Interfaces:
IGraphicsContext
The AWT implementation of
IGraphicsContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clip the subsequent drawing operations to the shape.void
dispose()
Dispose the current context and all its resources.void
disposeClip
(Object clip) void
Draws
using the current graphics context state.void
Draw imageimage
at coordinatesx
,y
.void
drawString
(String s, float x, float y) Draw a plain text string in the graphics.void
Fills
using the current graphics context state.The current background color.getClip()
The current clip.getFont()
The current foregroumd color.The associatedIGraphicsEnvironment
The currentRenderingHints
The transformatiom currentlz active.void
void
rotate
(float theta) Rotate the currently active transformation bytheta
.void
scale
(float x, float y) Scale the currently active transformation byx
,y
void
setBackgroundColor
(Color color) Assign a new background color.void
setBackgroundPaint
(IPaint paint) Assign a new backgroundIPaint
.void
setBackgroundPaint
(Paint paint) void
setBlendMode
(BlendMode blendMode) void
Assign the newshape
as the clipping shape.void
Set the current font for writing plain text in the graphics.void
Assign a new foreground color.void
setForegroundPaint
(IPaint paint) Assign a new foregroundIPaint
void
setForegroundPaint
(Paint paint) void
setRenderingHint
(RenderingHints.Key hintKey, Object hintValue) Set a specific rendering hint.void
setRenderingHints
(Map hints) Assign the currently active rendering hints.void
Assign the currently activeStroke
void
Set the currently activeAffineTransform
void
Transform theIGraphicsEnvironment
bytransform
void
translate
(float x, float y) translate the currently active transformation byx
,y
-
Constructor Details
-
CwtAwtGraphicsContext
-
-
Method Details
-
clip
Description copied from interface:IGraphicsContext
Clip the subsequent drawing operations to the shape. This adds the new clip shape to the existing one.- Specified by:
clip
in interfaceIGraphicsContext
-
dispose
public void dispose()Description copied from interface:IGraphicsContext
Dispose the current context and all its resources.- Specified by:
dispose
in interfaceIGraphicsContext
-
disposeClip
-
draw
Description copied from interface:IGraphicsContext
Draws
using the current graphics context state.- Specified by:
draw
in interfaceIGraphicsContext
-
drawImage
Description copied from interface:IGraphicsContext
Draw imageimage
at coordinatesx
,y
.- Specified by:
drawImage
in interfaceIGraphicsContext
-
drawString
Description copied from interface:IGraphicsContext
Draw a plain text string in the graphics.- Specified by:
drawString
in interfaceIGraphicsContext
-
fill
Description copied from interface:IGraphicsContext
Fills
using the current graphics context state.- Specified by:
fill
in interfaceIGraphicsContext
-
getBackgroundColor
Description copied from interface:IGraphicsContext
The current background color.- Specified by:
getBackgroundColor
in interfaceIGraphicsContext
- Returns:
-
getBlendMode
-
getClip
Description copied from interface:IGraphicsContext
The current clip.- Specified by:
getClip
in interfaceIGraphicsContext
- Returns:
-
getFont
-
getFontRenderContext
-
getForegroundColor
Description copied from interface:IGraphicsContext
The current foregroumd color.- Specified by:
getForegroundColor
in interfaceIGraphicsContext
- Returns:
-
getGraphics
-
getGraphicsEnvironment
Description copied from interface:IGraphicsContext
The associatedIGraphicsEnvironment
- Specified by:
getGraphicsEnvironment
in interfaceIGraphicsContext
- Returns:
-
getRenderingHints
Description copied from interface:IGraphicsContext
The currentRenderingHints
- Specified by:
getRenderingHints
in interfaceIGraphicsContext
- Returns:
-
getTransform
Description copied from interface:IGraphicsContext
The transformatiom currentlz active.- Specified by:
getTransform
in interfaceIGraphicsContext
- Returns:
-
resetAdvanced
public void resetAdvanced() -
rotate
public void rotate(float theta) Description copied from interface:IGraphicsContext
Rotate the currently active transformation bytheta
.- Specified by:
rotate
in interfaceIGraphicsContext
-
scale
public void scale(float x, float y) Description copied from interface:IGraphicsContext
Scale the currently active transformation byx
,y
- Specified by:
scale
in interfaceIGraphicsContext
-
setBackgroundColor
Description copied from interface:IGraphicsContext
Assign a new background color.- Specified by:
setBackgroundColor
in interfaceIGraphicsContext
-
setBackgroundPaint
Description copied from interface:IGraphicsContext
Assign a new backgroundIPaint
.- Specified by:
setBackgroundPaint
in interfaceIGraphicsContext
-
setBackgroundPaint
-
setBlendMode
-
setClip
Description copied from interface:IGraphicsContext
Assign the newshape
as the clipping shape.- Specified by:
setClip
in interfaceIGraphicsContext
-
setFont
Description copied from interface:IGraphicsContext
Set the current font for writing plain text in the graphics.- Specified by:
setFont
in interfaceIGraphicsContext
-
setForegroundColor
Description copied from interface:IGraphicsContext
Assign a new foreground color.- Specified by:
setForegroundColor
in interfaceIGraphicsContext
-
setForegroundPaint
Description copied from interface:IGraphicsContext
Assign a new foregroundIPaint
- Specified by:
setForegroundPaint
in interfaceIGraphicsContext
-
setForegroundPaint
-
setRenderingHint
Description copied from interface:IGraphicsContext
Set a specific rendering hint.- Specified by:
setRenderingHint
in interfaceIGraphicsContext
-
setRenderingHints
Description copied from interface:IGraphicsContext
Assign the currently active rendering hints.- Specified by:
setRenderingHints
in interfaceIGraphicsContext
-
setStroke
Description copied from interface:IGraphicsContext
Assign the currently activeStroke
- Specified by:
setStroke
in interfaceIGraphicsContext
-
setTransform
Description copied from interface:IGraphicsContext
Set the currently activeAffineTransform
- Specified by:
setTransform
in interfaceIGraphicsContext
-
transform
Description copied from interface:IGraphicsContext
Transform theIGraphicsEnvironment
bytransform
- Specified by:
transform
in interfaceIGraphicsContext
-
translate
public void translate(float x, float y) Description copied from interface:IGraphicsContext
translate the currently active transformation byx
,y
- Specified by:
translate
in interfaceIGraphicsContext
-