org.gnu.gdk
Class GC

java.lang.Object
  extended by org.gnu.glib.Struct
      extended by org.gnu.glib.GObject
          extended by org.gnu.gdk.GC

Deprecated. This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. This class may exist in java-gnome 4.0; look out for org.gnome.gdk.GC.

public class GC
extends org.gnu.glib.GObject

All drawing operations in GDK take a GC argument. A graphics context encapsulates information about the way things are drawn, such as the foreground color or line width. By using graphics context, the number of arguments to each drawing call is reduced, and communication overhead is minimized.


Constructor Summary
GC(Drawable drawable)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
GC(org.gnu.glib.Handle handle)
          Deprecated.  
GC(Window window)
          Deprecated.  
 
Method Summary
 void copy(GC source)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 int getClipXOrigin()
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 int getClipYOrigin()
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 Colormap getColormap()
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
static GC getDefaultGC(Drawable d)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 Screen getScreen()
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 int getTsXOrigin()
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 int getTsYOrigin()
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void offset(int xOffset, int yOffset)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setBackground(Color color)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setClipMask(Bitmap mask)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setClipOrigin(int x, int y)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setClipRectangle(Rectangle rect)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setClipRegion(Region reg)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setColormap(Colormap colormap)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setDashes(int dashOffset, int[] dashList)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setExposures(boolean exposures)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setFillMode(Fill mode)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setForeground(Color color)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setFunction(Function func)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setLineAttributes(int lineWidth, LineStyle lineStyle, CapStyle capStyle, JoinStyle joinStyle)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setOrigin(int x, int y)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setRGBBackground(Color color)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setRGBForeground(Color color)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setStipple(Pixmap stipple)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setSubwindow(SubwindowMode mode)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 void setTile(Pixmap tile)
          Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.
 
Methods inherited from class org.gnu.glib.GObject
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setProperty, setStringProperty, thawNotify
 
Methods inherited from class org.gnu.glib.Struct
equals, getHandle, getNullHandle, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GC

public GC(org.gnu.glib.Handle handle)
Deprecated. 

GC

public GC(Window window)
Deprecated. 

Parameters:
window -

GC

public GC(Drawable drawable)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Create a new graphics context with default values.

Parameters:
drawable - The created GC must always be used with drawables of the same depth as this one.
Method Detail

getDefaultGC

public static GC getDefaultGC(Drawable d)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Convenience method to construct a new GC with default values.

Parameters:
d -

getClipXOrigin

public int getClipXOrigin()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Getst he x origin of the clip mask.


getClipYOrigin

public int getClipYOrigin()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Gets the y origin of the clip mask.


getTsXOrigin

public int getTsXOrigin()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Gets the x origin of the tile or stipple.


getTsYOrigin

public int getTsYOrigin()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Gets the y origin of the tile or stipple.


setForeground

public void setForeground(Color color)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the foreground color for the graphics context.


setBackground

public void setBackground(Color color)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the background color for the graphics context.


setRGBForeground

public void setRGBForeground(Color color)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the foreground color using an unallocated color. The pixel value for the color will be determined using GdkRGB. If the colormap has not previously been initialized for GdkRGB, then for pseudo-color colormaps (colormaps with a small modifiable number of colors), a colorcube will be allocated in the colormap.

Calling this function for a GC without a colormap is an error.


setRGBBackground

public void setRGBBackground(Color color)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the background color using an unallocated color. The pixel value for the color will be determined using GdkRGB. If the colormap has not previously been initialized for GdkRGB, then for pseudo-color colormaps (colormaps with a small modifiable number of colors), a colorcube will be allocated in the colormap.

Calling this function for a GC without a colormap is an error.


setFunction

public void setFunction(Function func)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Determines how the current pixel values and the pixel values being drawn are combined to produce the final pixel values.


setFillMode

public void setFillMode(Fill mode)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the fill mode for the graphic context.


setTile

public void setTile(Pixmap tile)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the tile pixmap for the graphics context. This will only be used if the fill mode is TILED.


setStipple

public void setStipple(Pixmap stipple)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the stipple bitmap for a graphics context. The stipple will only be used if the fill mode is STIPPLED or OPAQUE_STIPPLED.


setOrigin

public void setOrigin(int x,
                      int y)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the origin when using tiles or stipples with the GC. The tile or stipple will be aligned such that the upper left cornor of the tile or stipple will coincide with this point.


setClipOrigin

public void setClipOrigin(int x,
                          int y)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the origin of the clip mask. The coordinates are interpreted relative to the upper-left cornor of the destination drawable of the current operation.


setClipRectangle

public void setClipRectangle(Rectangle rect)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the clip mask for a graphics context from a rectangle.


setClipRegion

public void setClipRegion(Region reg)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the clip mask for a graphics context from a region.


setClipMask

public void setClipMask(Bitmap mask)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the clip mask for a graphics context from a bitmap.


setSubwindow

public void setSubwindow(SubwindowMode mode)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets how drawing with this GC on a window will affect child windows.


setExposures

public void setExposures(boolean exposures)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets whether copying non-visible portions of a drawable using this graphics context generate exposure events for the corresponding regions of the destination drawable.

See Also:
Drawable.drawDrawable(org.gnu.gdk.GC, org.gnu.gdk.Drawable, int, int, int, int, int, int)

setLineAttributes

public void setLineAttributes(int lineWidth,
                              LineStyle lineStyle,
                              CapStyle capStyle,
                              JoinStyle joinStyle)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets various attributes of how lines are drawn. See the corresponding members of GdkGCValues for full explanations of the arguments.

Parameters:
lineWidth - the width of lines.
lineStyle - the dash-style for lines.
capStyle - the manner in which the ends of lines are drawn.
joinStyle - the manner in which lines are joined together.

setDashes

public void setDashes(int dashOffset,
                      int[] dashList)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the way dashed-lines are drawn. Lines will be drawn with alternating on and off segments of the lengths specified in dash_list. The manner in which the on and off segments are drawn is determined by the line style.

Parameters:
dashOffset - the phase of the pattern for the dashed line-style you want to see
dashList - the dash-list for the dashed line-style you want to set.
See Also:
setLineAttributes(int, org.gnu.gdk.LineStyle, org.gnu.gdk.CapStyle, org.gnu.gdk.JoinStyle)

offset

public void offset(int xOffset,
                   int yOffset)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Offset attributes such as the clip and tile-stipple origins of the GC so that drawing at X - x_offset, y - y_offset with the offset GC has the same effect as drawing at x, y with the original GC.

Parameters:
xOffset - amount by which to offset the GC in the X direction
yOffset - amount by which to offset the GC in the Y direction

copy

public void copy(GC source)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Copy the set of values (settings) from another graphics context.

Parameters:
source - the source graphics context.

setColormap

public void setColormap(Colormap colormap)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Sets the colormap to the given colormap. The depth of the colormap's visual must match the depth of the drawable for which the GC was created.


getColormap

public Colormap getColormap()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Gets the colormap, if it exists. A GC will have a colormap if the drawable for which it was created has a colormap, or if a colormap was set explicitely with setColormap().


getScreen

public Screen getScreen()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries.

Gets the Screen for which this GC was created.