|
intarsys CWT library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.cwt.swt.environment.CwtSwtGraphicsContext
public class CwtSwtGraphicsContext
An IGraphicsContext mapping to SWT.
It is currently not safe to use this IGraphicsContext concurrently.
| Constructor Summary | |
|---|---|
CwtSwtGraphicsContext(org.eclipse.swt.graphics.GC paramGC,
org.eclipse.swt.graphics.Device paramDevice)
|
|
| Method Summary | |
|---|---|
void |
clip(Shape shape)
Clip the subsequent drawing operations to the shape. |
void |
dispose()
Dispose the current context and all its resources. |
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. |
org.eclipse.swt.graphics.Device |
getDevice()
|
Font |
getFont()
|
FontRenderContext |
getFontRenderContext()
|
Color |
getForegroundColor()
The current foregroumd color. |
org.eclipse.swt.graphics.GC |
getGc()
|
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 |
setBackgroundColor(org.eclipse.swt.graphics.Color resource)
|
void |
setBackgroundPaint(IPaint paint)
Assign a new background IPaint. |
void |
setBackgroundPattern(org.eclipse.swt.graphics.Pattern resource)
|
void |
setBlendMode(BlendMode blendMode)
|
void |
setClip(Shape shape)
Assign the new shape as the clipping shape. |
void |
setFont(Font awtFont)
Set the current font for writing plain text in the graphics. |
void |
setForegroundColor(Color color)
Assign a new foreground color. |
void |
setForegroundColor(org.eclipse.swt.graphics.Color resource)
|
void |
setForegroundPaint(IPaint paint)
Assign a new foreground IPaint |
void |
setForegroundPattern(org.eclipse.swt.graphics.Pattern resource)
|
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 pTransform)
Set the currently active AffineTransform |
Point |
textExtent(String s)
|
static org.eclipse.swt.graphics.Path |
toPath(org.eclipse.swt.graphics.Device device,
PathIterator pathIterator)
|
static Rectangle2D |
toRectangle2D(org.eclipse.swt.graphics.Rectangle rect)
|
static org.eclipse.swt.graphics.Transform |
toTransform(org.eclipse.swt.graphics.Device device,
AffineTransform at)
This methods intentionally duplicated to avoid compile time dependency.. |
static org.eclipse.swt.graphics.Transform |
toTransform(org.eclipse.swt.graphics.Device device,
org.eclipse.swt.graphics.Transform st,
AffineTransform at)
This methods intentionally duplicated to avoid compile time dependency.. |
void |
transform(AffineTransform deltaTransform)
Transform the IGraphicsEnvironment by transform |
void |
translate(float x,
float y)
translate the currently active transformation by x,
y |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CwtSwtGraphicsContext(org.eclipse.swt.graphics.GC paramGC,
org.eclipse.swt.graphics.Device paramDevice)
| Method Detail |
|---|
public static org.eclipse.swt.graphics.Path toPath(org.eclipse.swt.graphics.Device device,
PathIterator pathIterator)
public static Rectangle2D toRectangle2D(org.eclipse.swt.graphics.Rectangle rect)
public static org.eclipse.swt.graphics.Transform toTransform(org.eclipse.swt.graphics.Device device,
AffineTransform at)
public static org.eclipse.swt.graphics.Transform toTransform(org.eclipse.swt.graphics.Device device,
org.eclipse.swt.graphics.Transform st,
AffineTransform at)
public void clip(Shape shape)
IGraphicsContext
clip in interface IGraphicsContextpublic void dispose()
IGraphicsContext
dispose in interface IGraphicsContextpublic void draw(Shape s)
IGraphicsContexts using the current graphics context state.
draw in interface IGraphicsContext
public void drawImage(IImage image,
float x,
float y)
IGraphicsContextimage at coordinates x,
y.
drawImage in interface IGraphicsContext
public void drawString(String s,
float x,
float y)
IGraphicsContext
drawString in interface IGraphicsContextpublic void fill(Shape s)
IGraphicsContexts using the current graphics context state.
fill in interface IGraphicsContextpublic Color getBackgroundColor()
IGraphicsContext
getBackgroundColor in interface IGraphicsContextpublic BlendMode getBlendMode()
public Shape getClip()
IGraphicsContext
getClip in interface IGraphicsContextpublic org.eclipse.swt.graphics.Device getDevice()
public Font getFont()
public FontRenderContext getFontRenderContext()
public Color getForegroundColor()
IGraphicsContext
getForegroundColor in interface IGraphicsContextpublic org.eclipse.swt.graphics.GC getGc()
public IGraphicsEnvironment getGraphicsEnvironment()
IGraphicsContextIGraphicsEnvironment
getGraphicsEnvironment in interface IGraphicsContextpublic RenderingHints getRenderingHints()
IGraphicsContextRenderingHints
getRenderingHints in interface IGraphicsContextpublic AffineTransform getTransform()
IGraphicsContext
getTransform in interface IGraphicsContextpublic void resetAdvanced()
public void rotate(float theta)
IGraphicsContexttheta.
rotate in interface IGraphicsContext
public void scale(float x,
float y)
IGraphicsContextx,
y
scale in interface IGraphicsContextpublic void setBackgroundColor(Color color)
IGraphicsContext
setBackgroundColor in interface IGraphicsContextpublic void setBackgroundColor(org.eclipse.swt.graphics.Color resource)
public void setBackgroundPaint(IPaint paint)
IGraphicsContextIPaint.
setBackgroundPaint in interface IGraphicsContextpublic void setBackgroundPattern(org.eclipse.swt.graphics.Pattern resource)
public void setBlendMode(BlendMode blendMode)
public void setClip(Shape shape)
IGraphicsContextshape as the clipping shape.
setClip in interface IGraphicsContextpublic void setFont(Font awtFont)
IGraphicsContext
setFont in interface IGraphicsContextpublic void setForegroundColor(Color color)
IGraphicsContext
setForegroundColor in interface IGraphicsContextpublic void setForegroundColor(org.eclipse.swt.graphics.Color resource)
public void setForegroundPaint(IPaint paint)
IGraphicsContextIPaint
setForegroundPaint in interface IGraphicsContextpublic void setForegroundPattern(org.eclipse.swt.graphics.Pattern resource)
public void setRenderingHint(RenderingHints.Key hintKey,
Object hintValue)
IGraphicsContext
setRenderingHint in interface IGraphicsContextpublic void setRenderingHints(Map hints)
IGraphicsContext
setRenderingHints in interface IGraphicsContextpublic void setStroke(Stroke s)
IGraphicsContextStroke
setStroke in interface IGraphicsContextpublic void setTransform(AffineTransform pTransform)
IGraphicsContextAffineTransform
setTransform in interface IGraphicsContextpublic Point textExtent(String s)
public void transform(AffineTransform deltaTransform)
IGraphicsContextIGraphicsEnvironment by transform
transform in interface IGraphicsContext
public void translate(float x,
float y)
IGraphicsContextx,
y
translate in interface IGraphicsContext
|
intarsys CWT library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||