gnu.x11
Class Drawable

java.lang.Object
  extended by gnu.x11.Resource
      extended by gnu.x11.Drawable
Direct Known Subclasses:
DBE.BackBuffer, Pixmap, Window

public abstract class Drawable
extends Resource

X drawable.


Nested Class Summary
static class Drawable.GeometryInfo
           
 
Field Summary
static int COMPLEX
           
static int CONVEX
           
static int CURSOR
           
 int height
           
static int NONCONVEX
           
static int ORIGIN
          Coordinate mode ORIGIN, specifies that points are always considered relative to the origin.
static int PREVIOUS
          Coordinate mode PREVIOUS, specifies that points are considered relative to the previous point (where the first point is usually considered relative to the origin).
static int STIPPLE
           
static int TILE
           
 int width
           
 
Fields inherited from class gnu.x11.Resource
display, id
 
Constructor Summary
Drawable(Display display)
          Create.
Drawable(Display display, int id)
          Intern.
Drawable(int id)
          Predefined.
 
Method Summary
 void arc(GC gc, int x, int y, int width, int height, int angle1, int angle2)
          Draws the outline of a single arc.
 Size best_size(int klass, int width, int height)
           
 void copy_area(Drawable src, GC gc, int src_x, int src_y, int width, int height, int dst_x, int dst_y)
          Copies a specified rectangular area to another location.
 void copy_plane(Drawable src, GC gc, int src_x, int src_y, int dst_x, int dst_y, int width, int height, int bit_plane)
           
 void fill_arc(GC gc, int x, int y, int width, int height, int angle1, int angle2)
          Fills a single arc.
 void fill_poly(GC gc, int[] xpoints, int[] ypoints, int npoints, int shape, int coordinate_mode)
           
 void fill_poly(GC gc, Point[] points, int shape, int coordinate_mode)
          This request will be aggregated.
 void fill_rectangle(GC gc, int x, int y, int width, int height)
          Fills a single rectangle.
 Drawable.GeometryInfo get_geometry()
           
 void image_text(GC gc, int x, int y, java.lang.String s)
           
 void image_text16(GC gc, int x, int y, java.lang.String s)
           
 Image image(int x, int y, int width, int height, int plane_mask, Image.Format format)
           
 void line(GC gc, int x1, int y1, int x2, int y2)
          Draws a single line.
 void point(GC gc, int x, int y)
          Draws a single point.
 void poly_arc(GC gc, Arc[] arcs)
           
 void poly_fill_arc(GC gc, Arc[] arcs)
           
 void poly_line(GC gc, int[] xpoints, int[] ypoints, int npoints, int coordinate_mode)
          Draws multiple lines that connect the specified points.
 void poly_line(GC gc, int[] xpoints, int[] ypoints, int npoints, int coordinate_mode, boolean close)
           
 void poly_line(GC gc, Point[] points, int coordinate_mode)
          Draws multiple lines which connect the specified points.
 void poly_point(GC gc, int[] xpoints, int[] ypoints, int npoints, int coordinate_mode)
          Draws multiple points.
 void poly_point(GC gc, Point[] points, int coordinate_mode)
          Draws multiple points.
 void poly_rectangle(GC gc, Rectangle[] rectangles)
          Draws the outline of multiple rectangles.
 void poly_segment(GC gc, Segment[] segments)
          Draws multiple line segments
 void poly_text(GC gc, int x, int y, Text[] texts)
           
 void poly_text16(GC gc, int x, int y, Text[] texts)
           
 void put_image(GC gc, Image image, int x, int y)
           
 void put_small_image(GC gc, Image image, int y1, int y2, int x, int y)
           
 void rectangle(GC gc, int x, int y, int width, int height)
          Draws a single rectangle.
 void rectangle(GC xgc, int x, int y, int w, int h, boolean fill)
          Deprecated.  
 void segment(GC gc, int x1, int y1, int x2, int y2)
           
 void text(GC gc, int x, int y, java.lang.String s)
           
 void text16(GC gc, int x, int y, java.lang.String s)
           
 void text8(GC gc, int x, int y, java.lang.String s, int delta, Font font)
           
 
Methods inherited from class gnu.x11.Resource
id, unintern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

public int width

height

public int height

ORIGIN

public static final int ORIGIN
Coordinate mode ORIGIN, specifies that points are always considered relative to the origin.

See Also:
Constant Field Values

PREVIOUS

public static final int PREVIOUS
Coordinate mode PREVIOUS, specifies that points are considered relative to the previous point (where the first point is usually considered relative to the origin).

See Also:
Constant Field Values

COMPLEX

public static final int COMPLEX
See Also:
Constant Field Values

NONCONVEX

public static final int NONCONVEX
See Also:
Constant Field Values

CONVEX

public static final int CONVEX
See Also:
Constant Field Values

CURSOR

public static final int CURSOR
See Also:
Constant Field Values

TILE

public static final int TILE
See Also:
Constant Field Values

STIPPLE

public static final int STIPPLE
See Also:
Constant Field Values
Constructor Detail

Drawable

public Drawable(int id)
Predefined.


Drawable

public Drawable(Display display)
Create.


Drawable

public Drawable(Display display,
                int id)
Intern.

Method Detail

get_geometry

public Drawable.GeometryInfo get_geometry()
See Also:
XGetGeometry

copy_area

public void copy_area(Drawable src,
                      GC gc,
                      int src_x,
                      int src_y,
                      int width,
                      int height,
                      int dst_x,
                      int dst_y)
Copies a specified rectangular area to another location.

Parameters:
src - the source drawable
gc - the GC for the operation
src_x - the source rectangle, x coordinate
src_y - the source rectangle, y coordinate
width - the width of the area to copy
height - the height of the area to copy
dst_x - the destination rectangle, x coordinate
dst_y - the destination rectangle, y coordinate
See Also:
XCopyArea

copy_plane

public void copy_plane(Drawable src,
                       GC gc,
                       int src_x,
                       int src_y,
                       int dst_x,
                       int dst_y,
                       int width,
                       int height,
                       int bit_plane)
See Also:
XCopyPlane

poly_point

public void poly_point(GC gc,
                       int[] xpoints,
                       int[] ypoints,
                       int npoints,
                       int coordinate_mode)
Draws multiple points.

Parameters:
gc - the GC to use
xpoints - the points' x coordinates
ypoints - the points' y coodinates
npoints - the number of points
coordinate_mode - valid: ORIGIN, PREVIOUS
See Also:
XDrawPoints

poly_point

public void poly_point(GC gc,
                       Point[] points,
                       int coordinate_mode)
Draws multiple points.

Parameters:
gc - the GC to use
xpoints - the points' x coordinates
ypoints - the points' y coodinates
npoints - the number of points
coordinate_mode - valid: ORIGIN, PREVIOUS
See Also:
XDrawPoints

poly_line

public void poly_line(GC gc,
                      int[] xpoints,
                      int[] ypoints,
                      int npoints,
                      int coordinate_mode)
Draws multiple lines that connect the specified points.

Parameters:
gc - the GC to use
xpoints - the points' x coordinates
ypoints - the points' y coodinates
npoints - the number of points
coordinate_mode - valid: ORIGIN, PREVIOUS
See Also:
XDrawLines

poly_line

public void poly_line(GC gc,
                      int[] xpoints,
                      int[] ypoints,
                      int npoints,
                      int coordinate_mode,
                      boolean close)

poly_line

public void poly_line(GC gc,
                      Point[] points,
                      int coordinate_mode)
Draws multiple lines which connect the specified points.

Parameters:
gc - the GC to use
points - the points that make up the lines
coordinate_mode - valid: ORIGIN, PREVIOUS
See Also:
XDrawLines

poly_segment

public void poly_segment(GC gc,
                         Segment[] segments)
Draws multiple line segments

Parameters:
gc - the GC to use
segments - the line segments to draw
See Also:
XDrawSegments

poly_rectangle

public void poly_rectangle(GC gc,
                           Rectangle[] rectangles)
Draws the outline of multiple rectangles.

Parameters:
gc - the GC to use
rectangles - the rectangles to draw
See Also:
XDrawRectangles, XFillRectangles, aggregation

poly_arc

public void poly_arc(GC gc,
                     Arc[] arcs)

poly_fill_arc

public void poly_fill_arc(GC gc,
                          Arc[] arcs)

fill_poly

public void fill_poly(GC gc,
                      Point[] points,
                      int shape,
                      int coordinate_mode)
This request will be aggregated.

Parameters:
shape - valid: COMPLEX, NONCONVEX, CONVEX
coordinate_mode - valid: ORIGIN, PREVIOUS
See Also:
XFillPolygon, aggregation

fill_poly

public void fill_poly(GC gc,
                      int[] xpoints,
                      int[] ypoints,
                      int npoints,
                      int shape,
                      int coordinate_mode)

put_small_image

public void put_small_image(GC gc,
                            Image image,
                            int y1,
                            int y2,
                            int x,
                            int y)

image

public Image image(int x,
                   int y,
                   int width,
                   int height,
                   int plane_mask,
                   Image.Format format)
See Also:
XGetImage

poly_text

public void poly_text(GC gc,
                      int x,
                      int y,
                      Text[] texts)
See Also:
XDrawText

poly_text16

public void poly_text16(GC gc,
                        int x,
                        int y,
                        Text[] texts)
See Also:
XDrawText16

image_text

public void image_text(GC gc,
                       int x,
                       int y,
                       java.lang.String s)
See Also:
XDrawImageString

image_text16

public void image_text16(GC gc,
                         int x,
                         int y,
                         java.lang.String s)
See Also:
XDrawImageString16

best_size

public Size best_size(int klass,
                      int width,
                      int height)
Parameters:
klass - valid: CURSOR, TILE, STIPPLE
See Also:
XQueryBestSize

arc

public void arc(GC gc,
                int x,
                int y,
                int width,
                int height,
                int angle1,
                int angle2)
Draws the outline of a single arc.

Parameters:
gc - the GC to use
x - the bounding rectangle, x coordinate
y - the bounding rectangle, y coordinate
w - the bounding rectangle, width
h - the bounding rectangle, height
angle1 - the start angle, from 3 o'clock ccw, in degrees
angle2 - the span angle, from angle1 ccw, in degrees
See Also:
poly_arc(GC, Arc[])

fill_arc

public void fill_arc(GC gc,
                     int x,
                     int y,
                     int width,
                     int height,
                     int angle1,
                     int angle2)
Fills a single arc.

Parameters:
gc - the GC to use
x - the bounding rectangle, x coordinate
y - the bounding rectangle, y coordinate
w - the bounding rectangle, width
h - the bounding rectangle, height
angle1 - the start angle, from 3 o'clock ccw, in degrees
angle2 - the span angle, from angle1 ccw, in degrees
See Also:
poly_arc(GC, Arc[])

line

public void line(GC gc,
                 int x1,
                 int y1,
                 int x2,
                 int y2)
Draws a single line.

Parameters:
gc - the GC to use
x1 - the start point, x coordinate
y1 - the start point, y coordinate
x2 - the end point, x coordinate
y2 - the end point, y coordinate

segment

public void segment(GC gc,
                    int x1,
                    int y1,
                    int x2,
                    int y2)

point

public void point(GC gc,
                  int x,
                  int y)
Draws a single point.

Parameters:
x - the x coordinate
y - the y coordinate

put_image

public void put_image(GC gc,
                      Image image,
                      int x,
                      int y)

rectangle

public void rectangle(GC gc,
                      int x,
                      int y,
                      int width,
                      int height)
Draws a single rectangle.

Parameters:
gc - the graphic context
x - the upper left corner, x coordinate
y - the upper left corner, y coordinate
width - the width
height - the height
See Also:
poly_rectangle(GC, Rectangle[])

fill_rectangle

public void fill_rectangle(GC gc,
                           int x,
                           int y,
                           int width,
                           int height)
Fills a single rectangle.

Parameters:
gc - the graphic context
x - the upper left corner, x coordinate
y - the upper left corner, y coordinate
width - the width
height - the height
See Also:
#poly_fill_rectangle(GC, Rectangle[])

text8

public void text8(GC gc,
                  int x,
                  int y,
                  java.lang.String s,
                  int delta,
                  Font font)
See Also:
poly_text(GC, int, int, Text[])

text

public void text(GC gc,
                 int x,
                 int y,
                 java.lang.String s)
See Also:
#text(GC, int, int, String, int, Font)

text16

public void text16(GC gc,
                   int x,
                   int y,
                   java.lang.String s)

rectangle

public void rectangle(GC xgc,
                      int x,
                      int y,
                      int w,
                      int h,
                      boolean fill)
Deprecated.