| Guifications Library Reference Manual |
|---|
GfDrawableGfDrawable — GfDrawable Object API |
GfDrawable;
void gf_drawable_get_size (const GfDrawable *drawable,
gint *width,
gint *height);
gint gf_drawable_get_depth (const GfDrawable *drawable);
GfColormap* gf_drawable_get_colormap (const GfDrawable *drawable);
void gf_drawable_set_colormap (GfDrawable *drawable,
GfColormap *colormap);
void gf_draw_point (GfDrawable *drawable,
GfGC *gc,
gint x,
gint y);
void gf_draw_line (GfDrawable *drawable,
GfGC *gc,
gint x1,
gint y1,
gint x2,
gint y2);
void gf_draw_rectangle (GfDrawable *drawable,
GfGC *gc,
gboolean filled,
gint x,
gint y,
gint width,
gint height);
void gf_draw_arc (GfDrawable *drawable,
GfGC *gc,
gboolean filled,
gint x,
gint y,
gint width,
gint height,
gint angle1,
gint angle2);
void gf_draw_polygon (GfDrawable *drawable,
GfGC *gc,
gboolean filled,
GfPoint *points,
gint npoints);
void gf_draw_text (GfDrawable *drawable,
const GfFont *font,
GfGC *gc,
gint x,
gint y,
const gchar *text,
gint text_len);
void gf_draw_drawable (GfDrawable *drawable,
GfGC *gc,
GfDrawable *src,
gint xsrc,
gint ysrc,
gint xdest,
gint ydest,
gint width,
gint height);
void gf_draw_points (GfDrawable *drawable,
GfGC *gc,
GfPoint *points,
gint npoints);
void gf_draw_segments (GfDrawable *drawable,
GfGC *gc,
GfSegment *segs,
gint nsegs);
void gf_draw_lines (GfDrawable *drawable,
GfGC *gc,
GfPoint *points,
gint npoints);
typedef struct _GfDrawable GfDrawable;
GfDrawable is an opaque structure that should not be used directly.
void gf_drawable_get_size (const GfDrawable *drawable, gint *width, gint *height);
Gets the size of drawable.
drawable : |
The GfDrawable instance. |
width : |
The return address for the width of drawable.
|
height : |
The return address for the height of drawable.
|
gint gf_drawable_get_depth (const GfDrawable *drawable);
Gets the color depth of drawable.
drawable : |
The GfDrawable instance. |
| Returns : | The color depth of drawable.
|
GfColormap* gf_drawable_get_colormap (const GfDrawable *drawable);
Gets the GfColormap for drawable.
drawable : |
The GfDrawable instance. |
| Returns : | The GfColormap for drawable.
|
void gf_drawable_set_colormap (GfDrawable *drawable, GfColormap *colormap);
Sets the colormap of drawable.
drawable : |
The GfDrawable instance. |
colormap : |
The GfColormap instance. |
void gf_draw_point (GfDrawable *drawable, GfGC *gc, gint x, gint y);
Draws a point at x, y on drawable.
drawable : |
The GfDrawable instance. |
gc : |
The GfGC instance. |
x : |
The x-coordinate. |
y : |
The y-coordinate. |
void gf_draw_line (GfDrawable *drawable, GfGC *gc, gint x1, gint y1, gint x2, gint y2);
Draws a line on drawable.
drawable : |
The GfDrawable instance. |
gc : |
The GfGC instance. |
x1 : |
The starting x-coordinate. |
y1 : |
The starting y-coordinate. |
x2 : |
The ending x-coordinate. |
y2 : |
The ending y-coordinate. |
void gf_draw_rectangle (GfDrawable *drawable, GfGC *gc, gboolean filled, gint x, gint y, gint width, gint height);
Draws a rectangle on drawable.
drawable : |
The GfDrawable instance. |
gc : |
The GfGC instance. |
filled : |
Whether or not to fill the rectangle. |
x : |
The x-coordinate of the rectangle. |
y : |
The y-coordinate of the rectangle. |
width : |
The width of the rectangle. |
height : |
The height of the rectangle. |
void gf_draw_arc (GfDrawable *drawable, GfGC *gc, gboolean filled, gint x, gint y, gint width, gint height, gint angle1, gint angle2);
Draws an arc on drawable.
drawable : |
The GfDrawable instance. |
gc : |
The GfGC instance. |
filled : |
Whether or not to fill the arc. |
x : |
The x-coordinate of the arc. |
y : |
The y-coordinate of the arc. |
width : |
The width of the arc. |
height : |
The height of the arc. |
angle1 : |
The starting angle. |
angle2 : |
The ending angle. |
void gf_draw_polygon (GfDrawable *drawable, GfGC *gc, gboolean filled, GfPoint *points, gint npoints);
Draws a polygon on drawable.
drawable : |
The GfDrawable instance. |
gc : |
The GfGC instance. |
filled : |
Whether or not to fill the polygon. |
points : |
The GfPoint's in the polygon. |
npoints : |
The number of points.
|
void gf_draw_text (GfDrawable *drawable, const GfFont *font, GfGC *gc, gint x, gint y, const gchar *text, gint text_len);
Draws text on drawable.
drawable : |
The GfDrawable instance. |
font : |
The GfFont instance. |
gc : |
The GfGC instance. |
x : |
The x-coordinate for the text. |
y : |
The y-coordinate for the text. |
text : |
The text to draw. |
text_len : |
The length of text.
|
void gf_draw_drawable (GfDrawable *drawable, GfGC *gc, GfDrawable *src, gint xsrc, gint ysrc, gint xdest, gint ydest, gint width, gint height);
Draws src to drawable.
drawable : |
The GfDrawable instance. |
gc : |
The GfGC instance. |
src : |
The GfDrawable to draw from. |
xsrc : |
The x-coordinate of src.
|
ysrc : |
The y-coordinate of src.
|
xdest : |
The x-coordinate for drawable.
|
ydest : |
The y-coordinate for drawable.
|
width : |
The width of src to draw.
|
height : |
The height of src to draw.
|
void gf_draw_points (GfDrawable *drawable, GfGC *gc, GfPoint *points, gint npoints);
Draws a number of points on drawable.
drawable : |
The GfDrawable instance. |
gc : |
The GfGC instance. |
points : |
An array of GfPoint's. |
npoints : |
The number of points.
|
void gf_draw_segments (GfDrawable *drawable, GfGC *gc, GfSegment *segs, gint nsegs);
Draws a number of segments on drawable.
drawable : |
The GfDrawable instance. |
gc : |
The GfGC instance. |
segs : |
An array of GfSegment's. |
nsegs : |
The number of segs.
|
void gf_draw_lines (GfDrawable *drawable, GfGC *gc, GfPoint *points, gint npoints);
Draws a number of connected lines on drawable.
drawable : |
The GfDrawable instance. |
gc : |
The GfGC instance. |
points : |
An array of GfPoint's. |
npoints : |
The number of points.
|
| << User Interface Abstraction | GfColormap >> |