|
|||||||||
| Home >> All >> gnu >> java >> awt >> peer >> [ gtk overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
gnu.java.awt.peer.gtk
Class GdkGraphics

java.lang.Objectjava.awt.Graphics
gnu.java.awt.peer.gtk.GdkGraphics
- public class GdkGraphics
- extends java.awt.Graphics
| Field Summary | |
(package private) GdkGraphics |
cached
A cached instance that is used by create() 55 in order to avoid
massive allocation of graphics contexts. |
(package private) java.awt.Rectangle |
clip
|
(package private) java.awt.Color |
color
|
(package private) GtkComponentPeer |
component
|
(package private) java.awt.Font |
font
|
(package private) static int |
GDK_COPY
|
(package private) static int |
GDK_XOR
|
(package private) GtkImage |
image
|
private int |
native_state
|
(package private) GdkGraphics |
parent
A link to the parent context. |
(package private) int |
xOffset
|
(package private) java.awt.Color |
xorColor
|
(package private) int |
yOffset
|
| Constructor Summary | |
(package private) |
GdkGraphics(GdkGraphics g)
|
(package private) |
GdkGraphics(GtkComponentPeer component)
|
(package private) |
GdkGraphics(GtkImage image)
|
(package private) |
GdkGraphics(int width,
int height)
|
| Method Summary | |
void |
clearRect(int x,
int y,
int width,
int height)
Clears the specified rectangle. |
void |
clipRect(int x,
int y,
int width,
int height)
Sets the clipping region to the intersection of the current clipping region and the rectangle determined by the specified parameters. |
(package private) void |
connectSignals(GtkComponentPeer component)
|
void |
copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
Copies the specified rectangle to the specified offset location. |
private void |
copyState(GdkGraphics g)
Copies over the state of another GdkGraphics to this instance. |
java.awt.Graphics |
create()
Creates a copy of this GdkGraphics instance. |
void |
dispose()
Disposes this graphics object. |
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Draws an arc using the specified bounding rectangle and the specified angle parameter. |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
Draws all of the image that is available and returns. |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer)
Draws all of the image that is available and returns. |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
Draws all of the image that is available and returns. |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer)
Draws all of the image that is available and returns. |
boolean |
drawImage(java.awt.Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
FIXME: Write Javadocs for this when you understand it. |
boolean |
drawImage(java.awt.Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
java.awt.image.ImageObserver observer)
FIXME: Write Javadocs for this when you understand it. |
void |
drawLine(int x1,
int y1,
int x2,
int y2)
Draws a line between the two specified points. |
void |
drawOval(int x,
int y,
int width,
int height)
Draws an oval that just fits within the specified rectangle. |
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Draws a series of interconnected lines determined by the arrays of corresponding x and y coordinates. |
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
Draws a series of interconnected lines determined by the arrays of corresponding x and y coordinates. |
void |
drawRect(int x,
int y,
int width,
int height)
Draws the outline of the specified rectangle. |
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Draws the outline of the specified rectangle with rounded cornders. |
void |
drawString(java.text.AttributedCharacterIterator ci,
int x,
int y)
|
(package private) void |
drawString(GdkFontPeer f,
java.lang.String str,
int x,
int y)
|
void |
drawString(java.lang.String str,
int x,
int y)
Draws the specified string starting at the specified point. |
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Fills the arc define by the specified bounding rectangle and the specified angle parameter. |
void |
fillOval(int x,
int y,
int width,
int height)
Fills an oval that just fits within the specified rectangle. |
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Fills the polygon determined by the arrays of corresponding x and y coordinates. |
void |
fillRect(int x,
int y,
int width,
int height)
Fills the area bounded by the specified rectangle. |
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Fills the specified rectangle with rounded cornders. |
void |
finalize()
This is called when this object gets finalized by the garbage collector. |
java.awt.Shape |
getClip()
Returns the current clipping region as a Shape object. |
java.awt.Rectangle |
getClipBounds()
Returns the bounding rectangle of the clipping region for this graphics context. |
java.awt.Color |
getColor()
Returns the current color for this object. |
java.awt.Font |
getFont()
Returns the current font for this graphics context. |
java.awt.FontMetrics |
getFontMetrics(java.awt.Font font)
Returns the font metrics for the specified font. |
(package private) GdkFontPeer |
getFontPeer()
|
(package private) void |
initComponentGraphics()
|
(package private) void |
initComponentGraphicsUnlocked()
|
(package private) void |
initFromImage(GtkImage image)
|
(package private) void |
initState(GtkComponentPeer component)
|
(package private) void |
initState(int width,
int height)
|
(package private) void |
initStateUnlocked(GtkComponentPeer component)
|
(package private) static void |
initStaticState()
|
(package private) void |
nativeCopyState(GdkGraphics g)
|
void |
nativeDispose()
|
void |
setClip(int x,
int y,
int width,
int height)
Sets the clipping region to the rectangle determined by the specified parameters. |
void |
setClip(java.awt.Rectangle clip)
|
void |
setClip(java.awt.Shape clip)
Sets the clipping region to the specified Shape. |
(package private) void |
setClipRectangle(int x,
int y,
int width,
int height)
|
void |
setColor(java.awt.Color c)
Sets the current color for this object. |
private void |
setFGColor(int red,
int green,
int blue)
|
void |
setFont(java.awt.Font font)
Sets the font for this graphics context to the specified value. |
(package private) void |
setFunction(int gdk_func)
|
void |
setPaintMode()
Sets this context into "paint" mode, where the target pixels are completely overwritten when drawn on. |
void |
setXORMode(java.awt.Color c)
Sets this context info "XOR" mode, where the targe pixles are XOR-ed when drawn on. |
void |
translate(int x,
int y)
Translates this context so that its new origin point is the point (x, y). |
void |
translateNative(int x,
int y)
|
| Methods inherited from class java.awt.Graphics |
create, draw3DRect, drawBytes, drawChars, drawPolygon, fill3DRect, fillPolygon, getClipBounds, getClipRect, getFontMetrics, hitClip, toString |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
native_state
private final int native_state
color
java.awt.Color color
xorColor
java.awt.Color xorColor
component
GtkComponentPeer component
font
java.awt.Font font
clip
java.awt.Rectangle clip
image
GtkImage image
xOffset
int xOffset
yOffset
int yOffset
GDK_COPY
static final int GDK_COPY
- See Also:
- Constant Field Values
GDK_XOR
static final int GDK_XOR
- See Also:
- Constant Field Values
cached
GdkGraphics cached
- A cached instance that is used by
create()55 in order to avoid massive allocation of graphics contexts.
parent
GdkGraphics parent
- A link to the parent context. This is used in
dispose()55 to put this graphics context into the cache.
| Constructor Detail |
GdkGraphics
GdkGraphics(GdkGraphics g)
GdkGraphics
GdkGraphics(int width,
int height)
GdkGraphics
GdkGraphics(GtkImage image)
GdkGraphics
GdkGraphics(GtkComponentPeer component)
| Method Detail |
initStaticState
static void initStaticState()
initState
void initState(GtkComponentPeer component)
initStateUnlocked
void initStateUnlocked(GtkComponentPeer component)
initState
void initState(int width,
int height)
initFromImage
void initFromImage(GtkImage image)
nativeCopyState
void nativeCopyState(GdkGraphics g)
initComponentGraphics
void initComponentGraphics()
initComponentGraphicsUnlocked
void initComponentGraphicsUnlocked()
connectSignals
void connectSignals(GtkComponentPeer component)
clearRect
public void clearRect(int x,
int y,
int width,
int height)
- Description copied from class:
java.awt.Graphics - Clears the specified rectangle.
clipRect
public void clipRect(int x,
int y,
int width,
int height)
- Description copied from class:
java.awt.Graphics - Sets the clipping region to the intersection of the current clipping
region and the rectangle determined by the specified parameters.
copyArea
public void copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
- Description copied from class:
java.awt.Graphics - Copies the specified rectangle to the specified offset location.
create
public java.awt.Graphics create()
- Creates a copy of this GdkGraphics instance. This implementation can
reuse a cached instance to avoid massive instantiation of Graphics objects
during painting.
nativeDispose
public void nativeDispose()
dispose
public void dispose()
- Disposes this graphics object. This puts this graphics context into the
cache of its parent graphics if there is one.
finalize
public void finalize()
- This is called when this object gets finalized by the garbage collector.
In addition to Graphics.finalize()>
Graphics.finalize()55 this calls nativeDispose() to make sure the native resources are freed before the graphics context is thrown away.
drawImage
public boolean drawImage(java.awt.Image img, int x, int y, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
- Description copied from class:
java.awt.Graphics - Draws all of the image that is available and returns. If the image
is not completely loaded,
falseis returned and the specified iamge observer is notified as more data becomes available.
drawImage
public boolean drawImage(java.awt.Image img, int x, int y, java.awt.image.ImageObserver observer)
- Description copied from class:
java.awt.Graphics - Draws all of the image that is available and returns. If the image
is not completely loaded,
falseis returned and the specified iamge observer is notified as more data becomes available.
drawImage
public boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
- Description copied from class:
java.awt.Graphics - Draws all of the image that is available and returns. The image
is scaled to fit in the specified rectangle. If the image
is not completely loaded,
falseis returned and the specified iamge observer is notified as more data becomes available.
drawImage
public boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.image.ImageObserver observer)
- Description copied from class:
java.awt.Graphics - Draws all of the image that is available and returns. The image
is scaled to fit in the specified rectangle. If the image
is not completely loaded,
falseis returned and the specified iamge observer is notified as more data becomes available.
drawImage
public boolean drawImage(java.awt.Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
- Description copied from class:
java.awt.Graphics - FIXME: Write Javadocs for this when you understand it.
drawImage
public boolean drawImage(java.awt.Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, java.awt.image.ImageObserver observer)
- Description copied from class:
java.awt.Graphics - FIXME: Write Javadocs for this when you understand it.
drawLine
public void drawLine(int x1,
int y1,
int x2,
int y2)
- Description copied from class:
java.awt.Graphics - Draws a line between the two specified points.
drawArc
public void drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
- Description copied from class:
java.awt.Graphics - Draws an arc using the specified bounding rectangle and the specified
angle parameter. The arc is centered at the center of the rectangle.
The arc starts at the arcAngle position and extend for arcAngle
degrees. The degree origin is at the 3 o'clock position.
fillArc
public void fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
- Description copied from class:
java.awt.Graphics - Fills the arc define by the specified bounding rectangle and the specified
angle parameter. The arc is centered at the center of the rectangle.
The arc starts at the arcAngle position and extend for arcAngle
degrees. The degree origin is at the 3 o'clock position.
drawOval
public void drawOval(int x,
int y,
int width,
int height)
- Description copied from class:
java.awt.Graphics - Draws an oval that just fits within the specified rectangle.
fillOval
public void fillOval(int x,
int y,
int width,
int height)
- Description copied from class:
java.awt.Graphics - Fills an oval that just fits within the specified rectangle.
drawPolygon
public void drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
- Description copied from class:
java.awt.Graphics - Draws a series of interconnected lines determined by the arrays
of corresponding x and y coordinates. The figure is closed if necessary
by connecting the first and last points.
fillPolygon
public void fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
- Description copied from class:
java.awt.Graphics - Fills the polygon determined by the arrays
of corresponding x and y coordinates.
drawPolyline
public void drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
- Description copied from class:
java.awt.Graphics - Draws a series of interconnected lines determined by the arrays
of corresponding x and y coordinates.
drawRect
public void drawRect(int x,
int y,
int width,
int height)
- Description copied from class:
java.awt.Graphics - Draws the outline of the specified rectangle.
fillRect
public void fillRect(int x,
int y,
int width,
int height)
- Description copied from class:
java.awt.Graphics - Fills the area bounded by the specified rectangle.
getFontPeer
GdkFontPeer getFontPeer()
drawString
void drawString(GdkFontPeer f, java.lang.String str, int x, int y)
drawString
public void drawString(java.lang.String str, int x, int y)
- Description copied from class:
java.awt.Graphics - Draws the specified string starting at the specified point.
drawString
public void drawString(java.text.AttributedCharacterIterator ci, int x, int y)
drawRoundRect
public void drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
- Description copied from class:
java.awt.Graphics - Draws the outline of the specified rectangle with rounded cornders.
fillRoundRect
public void fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
- Description copied from class:
java.awt.Graphics - Fills the specified rectangle with rounded cornders.
getClip
public java.awt.Shape getClip()
- Description copied from class:
java.awt.Graphics - Returns the current clipping region as a
Shapeobject.
getClipBounds
public java.awt.Rectangle getClipBounds()
- Description copied from class:
java.awt.Graphics - Returns the bounding rectangle of the clipping region for this
graphics context.
getColor
public java.awt.Color getColor()
- Description copied from class:
java.awt.Graphics - Returns the current color for this object.
getFont
public java.awt.Font getFont()
- Description copied from class:
java.awt.Graphics - Returns the current font for this graphics context.
getFontMetrics
public java.awt.FontMetrics getFontMetrics(java.awt.Font font)
- Description copied from class:
java.awt.Graphics - Returns the font metrics for the specified font.
setClipRectangle
void setClipRectangle(int x,
int y,
int width,
int height)
setClip
public void setClip(int x,
int y,
int width,
int height)
- Description copied from class:
java.awt.Graphics - Sets the clipping region to the rectangle determined by the specified
parameters.
setClip
public void setClip(java.awt.Rectangle clip)
setClip
public void setClip(java.awt.Shape clip)
- Description copied from class:
java.awt.Graphics - Sets the clipping region to the specified
Shape.
setFGColor
private void setFGColor(int red,
int green,
int blue)
setColor
public void setColor(java.awt.Color c)
- Description copied from class:
java.awt.Graphics - Sets the current color for this object.
setFont
public void setFont(java.awt.Font font)
- Description copied from class:
java.awt.Graphics - Sets the font for this graphics context to the specified value.
setFunction
void setFunction(int gdk_func)
setPaintMode
public void setPaintMode()
- Description copied from class:
java.awt.Graphics - Sets this context into "paint" mode, where the target pixels are
completely overwritten when drawn on.
setXORMode
public void setXORMode(java.awt.Color c)
- Description copied from class:
java.awt.Graphics - Sets this context info "XOR" mode, where the targe pixles are
XOR-ed when drawn on.
translateNative
public void translateNative(int x,
int y)
translate
public void translate(int x,
int y)
- Description copied from class:
java.awt.Graphics - Translates this context so that its new origin point is the point
(x, y).
copyState
private void copyState(GdkGraphics g)
- Copies over the state of another GdkGraphics to this instance. This is
used by the
GdkGraphics(GdkGraphics)55 constructor and thecreate()55 method.
|
|||||||||
| Home >> All >> gnu >> java >> awt >> peer >> [ gtk overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC