public class CwtAwtGraphicsContext extends Object implements IGraphicsContext
IGraphicsContext| Constructor and Description |
|---|
CwtAwtGraphicsContext(Graphics2D paramGraphics) |
| Modifier and Type | Method and Description |
|---|---|
void |
clip(Shape shape)
Clip the subsequent drawing operations to the shape.
|
void |
dispose()
Dispose the current context and all its resources.
|
void |
disposeClip(Object clip) |
void |
draw(Shape s)
Draw
s using the current graphics context state. |
void |
drawImage(IImage image,
float x,
float y)
Draw image
image at coordinates x,
y. |
void |
drawString(String s,
float x,
float y)
Draw a plain text string in the graphics.
|
void |
fill(Shape s)
Fill
s using the current graphics context state. |
Color |
getBackgroundColor()
The current background color.
|
BlendMode |
getBlendMode() |
Shape |
getClip()
The current clip.
|
Font |
getFont() |
FontRenderContext |
getFontRenderContext() |
Color |
getForegroundColor()
The current foregroumd color.
|
Graphics2D |
getGraphics() |
IGraphicsEnvironment |
getGraphicsEnvironment()
The associated
IGraphicsEnvironment |
RenderingHints |
getRenderingHints()
The current
RenderingHints |
AffineTransform |
getTransform()
The transformatiom currentlz active.
|
void |
resetAdvanced() |
void |
rotate(float theta)
Rotate the currently active transformation by
theta. |
void |
scale(float x,
float y)
Scale the currently active transformation by
x,
y |
void |
setBackgroundColor(Color color)
Assign a new background color.
|
void |
setBackgroundPaint(IPaint paint)
Assign a new background
IPaint. |
void |
setBackgroundPaint(Paint paint) |
void |
setBlendMode(BlendMode blendMode) |
void |
setClip(Shape shape)
Assign the new
shape as the clipping shape. |
void |
setFont(Font font)
Set the current font for writing plain text in the graphics.
|
void |
setForegroundColor(Color c)
Assign a new foreground color.
|
void |
setForegroundPaint(IPaint paint)
Assign a new foreground
IPaint |
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 |
setStroke(Stroke s)
Assign the currently active
Stroke |
void |
setTransform(AffineTransform Tx)
Set the currently active
AffineTransform |
void |
transform(AffineTransform Tx)
Transform the
IGraphicsEnvironment by transform |
void |
translate(float x,
float y)
translate the currently active transformation by
x,
y |
public CwtAwtGraphicsContext(Graphics2D paramGraphics)
public void clip(Shape shape)
IGraphicsContextclip in interface IGraphicsContextpublic void dispose()
IGraphicsContextdispose in interface IGraphicsContextpublic void disposeClip(Object clip)
public void draw(Shape s)
IGraphicsContexts using the current graphics context state.draw in interface IGraphicsContextpublic void drawImage(IImage image, float x, float y)
IGraphicsContextimage at coordinates x,
y.drawImage in interface IGraphicsContextpublic void drawString(String s, float x, float y)
IGraphicsContextdrawString in interface IGraphicsContextpublic void fill(Shape s)
IGraphicsContexts using the current graphics context state.fill in interface IGraphicsContextpublic Color getBackgroundColor()
IGraphicsContextgetBackgroundColor in interface IGraphicsContextpublic BlendMode getBlendMode()
public Shape getClip()
IGraphicsContextgetClip in interface IGraphicsContextpublic Font getFont()
public FontRenderContext getFontRenderContext()
public Color getForegroundColor()
IGraphicsContextgetForegroundColor in interface IGraphicsContextpublic Graphics2D getGraphics()
public IGraphicsEnvironment getGraphicsEnvironment()
IGraphicsContextIGraphicsEnvironmentgetGraphicsEnvironment in interface IGraphicsContextpublic RenderingHints getRenderingHints()
IGraphicsContextRenderingHintsgetRenderingHints in interface IGraphicsContextpublic AffineTransform getTransform()
IGraphicsContextgetTransform in interface IGraphicsContextpublic void resetAdvanced()
public void rotate(float theta)
IGraphicsContexttheta.rotate in interface IGraphicsContextpublic void scale(float x,
float y)
IGraphicsContextx,
yscale in interface IGraphicsContextpublic void setBackgroundColor(Color color)
IGraphicsContextsetBackgroundColor in interface IGraphicsContextpublic void setBackgroundPaint(IPaint paint)
IGraphicsContextIPaint.setBackgroundPaint in interface IGraphicsContextpublic void setBackgroundPaint(Paint paint)
public void setBlendMode(BlendMode blendMode)
public void setClip(Shape shape)
IGraphicsContextshape as the clipping shape.setClip in interface IGraphicsContextpublic void setFont(Font font)
IGraphicsContextsetFont in interface IGraphicsContextpublic void setForegroundColor(Color c)
IGraphicsContextsetForegroundColor in interface IGraphicsContextpublic void setForegroundPaint(IPaint paint)
IGraphicsContextIPaintsetForegroundPaint in interface IGraphicsContextpublic void setForegroundPaint(Paint paint)
public void setRenderingHint(RenderingHints.Key hintKey, Object hintValue)
IGraphicsContextsetRenderingHint in interface IGraphicsContextpublic void setRenderingHints(Map hints)
IGraphicsContextsetRenderingHints in interface IGraphicsContextpublic void setStroke(Stroke s)
IGraphicsContextStrokesetStroke in interface IGraphicsContextpublic void setTransform(AffineTransform Tx)
IGraphicsContextAffineTransformsetTransform in interface IGraphicsContextpublic void transform(AffineTransform Tx)
IGraphicsContextIGraphicsEnvironment by transformtransform in interface IGraphicsContextpublic void translate(float x,
float y)
IGraphicsContextx,
ytranslate in interface IGraphicsContextCopyright © 2013 intarsys consulting GmbH. All Rights Reserved.