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 TypeMethodDescriptionvoidClip the subsequent drawing operations to the shape.voiddispose()Dispose the current context and all its resources.voiddisposeClip(Object clip) voidDrawsusing the current graphics context state.voidDraw imageimageat coordinatesx,y.voiddrawString(String s, float x, float y) Draw a plain text string in the graphics.voidFillsusing the current graphics context state.The current background color.getClip()The current clip.getFont()The current foregroumd color.The associatedIGraphicsEnvironmentThe currentRenderingHintsThe transformatiom currentlz active.voidvoidrotate(float theta) Rotate the currently active transformation bytheta.voidscale(float x, float y) Scale the currently active transformation byx,yvoidsetBackgroundColor(Color color) Assign a new background color.voidsetBackgroundPaint(IPaint paint) Assign a new backgroundIPaint.voidsetBackgroundPaint(Paint paint) voidsetBlendMode(BlendMode blendMode) voidAssign the newshapeas the clipping shape.voidSet the current font for writing plain text in the graphics.voidAssign a new foreground color.voidsetForegroundPaint(IPaint paint) Assign a new foregroundIPaintvoidsetForegroundPaint(Paint paint) voidsetRenderingHint(RenderingHints.Key hintKey, Object hintValue) Set a specific rendering hint.voidsetRenderingHints(Map hints) Assign the currently active rendering hints.voidAssign the currently activeStrokevoidSet the currently activeAffineTransformvoidTransform theIGraphicsEnvironmentbytransformvoidtranslate(float x, float y) translate the currently active transformation byx,y
-
Constructor Details
-
CwtAwtGraphicsContext
-
-
Method Details
-
clip
Description copied from interface:IGraphicsContextClip the subsequent drawing operations to the shape. This adds the new clip shape to the existing one.- Specified by:
clipin interfaceIGraphicsContext- Parameters:
shape-
-
dispose
public void dispose()Description copied from interface:IGraphicsContextDispose the current context and all its resources.- Specified by:
disposein interfaceIGraphicsContext
-
disposeClip
-
draw
Description copied from interface:IGraphicsContextDrawsusing the current graphics context state.- Specified by:
drawin interfaceIGraphicsContext- Parameters:
s-
-
drawImage
Description copied from interface:IGraphicsContextDraw imageimageat coordinatesx,y.- Specified by:
drawImagein interfaceIGraphicsContext- Parameters:
image-x-y-
-
drawString
Description copied from interface:IGraphicsContextDraw a plain text string in the graphics.- Specified by:
drawStringin interfaceIGraphicsContext- Parameters:
s-x-y-
-
fill
Description copied from interface:IGraphicsContextFillsusing the current graphics context state.- Specified by:
fillin interfaceIGraphicsContext- Parameters:
s-
-
getBackgroundColor
Description copied from interface:IGraphicsContextThe current background color.- Specified by:
getBackgroundColorin interfaceIGraphicsContext- Returns:
-
getBlendMode
-
getClip
Description copied from interface:IGraphicsContextThe current clip.- Specified by:
getClipin interfaceIGraphicsContext- Returns:
-
getFont
-
getFontRenderContext
-
getForegroundColor
Description copied from interface:IGraphicsContextThe current foregroumd color.- Specified by:
getForegroundColorin interfaceIGraphicsContext- Returns:
-
getGraphics
-
getGraphicsEnvironment
Description copied from interface:IGraphicsContextThe associatedIGraphicsEnvironment- Specified by:
getGraphicsEnvironmentin interfaceIGraphicsContext- Returns:
-
getRenderingHints
Description copied from interface:IGraphicsContextThe currentRenderingHints- Specified by:
getRenderingHintsin interfaceIGraphicsContext- Returns:
-
getTransform
Description copied from interface:IGraphicsContextThe transformatiom currentlz active.- Specified by:
getTransformin interfaceIGraphicsContext- Returns:
-
resetAdvanced
public void resetAdvanced() -
rotate
public void rotate(float theta) Description copied from interface:IGraphicsContextRotate the currently active transformation bytheta.- Specified by:
rotatein interfaceIGraphicsContext- Parameters:
theta-
-
scale
public void scale(float x, float y) Description copied from interface:IGraphicsContextScale the currently active transformation byx,y- Specified by:
scalein interfaceIGraphicsContext
-
setBackgroundColor
Description copied from interface:IGraphicsContextAssign a new background color.- Specified by:
setBackgroundColorin interfaceIGraphicsContext- Parameters:
color-
-
setBackgroundPaint
Description copied from interface:IGraphicsContextAssign a new backgroundIPaint.- Specified by:
setBackgroundPaintin interfaceIGraphicsContext- Parameters:
paint-
-
setBackgroundPaint
-
setBlendMode
-
setClip
Description copied from interface:IGraphicsContextAssign the newshapeas the clipping shape.- Specified by:
setClipin interfaceIGraphicsContext- Parameters:
shape-
-
setFont
Description copied from interface:IGraphicsContextSet the current font for writing plain text in the graphics.- Specified by:
setFontin interfaceIGraphicsContext- Parameters:
font-
-
setForegroundColor
Description copied from interface:IGraphicsContextAssign a new foreground color.- Specified by:
setForegroundColorin interfaceIGraphicsContext- Parameters:
c-
-
setForegroundPaint
Description copied from interface:IGraphicsContextAssign a new foregroundIPaint- Specified by:
setForegroundPaintin interfaceIGraphicsContext- Parameters:
paint-
-
setForegroundPaint
-
setRenderingHint
Description copied from interface:IGraphicsContextSet a specific rendering hint.- Specified by:
setRenderingHintin interfaceIGraphicsContext- Parameters:
hintKey-hintValue-
-
setRenderingHints
Description copied from interface:IGraphicsContextAssign the currently active rendering hints.- Specified by:
setRenderingHintsin interfaceIGraphicsContext- Parameters:
hints-
-
setStroke
Description copied from interface:IGraphicsContextAssign the currently activeStroke- Specified by:
setStrokein interfaceIGraphicsContext- Parameters:
s-
-
setTransform
Description copied from interface:IGraphicsContextSet the currently activeAffineTransform- Specified by:
setTransformin interfaceIGraphicsContext- Parameters:
Tx-
-
transform
Description copied from interface:IGraphicsContextTransform theIGraphicsEnvironmentbytransform- Specified by:
transformin interfaceIGraphicsContext- Parameters:
Tx-
-
translate
public void translate(float x, float y) Description copied from interface:IGraphicsContexttranslate the currently active transformation byx,y- Specified by:
translatein interfaceIGraphicsContext
-