Gtk-- Reference: Gdk_Drawable

Class Index | Cross Index | Namespace Index

# Class Gdk_Drawable

Gdk Drawable handle.
Contained in: global
Derived from: Gdk_Handle
Derived by: Gdk_Bitmap Gdk_Pixmap Gdk_Window

#include <gtk--/drawable.h>

### public function member index:
`` | `Gdk_Drawable` | `(`GdkDrawable`* `drawable`)`;
`` | `Gdk_Drawable` | `(`const` `Gdk_Drawable`& `drawable`)`;
``void`` | `copy_area` | `(`const` `Gdk_GC`& `gc`, `gint` `x`, `gint` `y`, `const` `Gdk_Drawable`& `src`, `gint` `src_x`, `gint` `src_y`, `gint` `width`, `gint` `height`)`;
``void`` | `draw_arc` | `(`const` `Gdk_GC`& `gc`, `gint` `filled`, `gint` `x`, `gint` `y`, `gint` `width`, `gint` `height`, `gint` `angle1`, `gint` `angle2`)`;
``void`` | `draw_bitmap` | `(`const` `Gdk_GC`& `gc`, `const` `Gdk_Bitmap`& `src`, `gint` `xsrc`, `gint` `ysrc`, `gint` `xdest`, `gint` `ydest`, `gint` `width` = -1, `gint` `height` = -1)`;
``void`` | `draw_image` | `(`const` `Gdk_GC`& `gc`, `const` `Gdk_Image`& `image`, `gint` `xsrc`, `gint` `ysrc`, `gint` `xdest`, `gint` `ydest`, `gint` `width` = -1, `gint` `height` = -1)`;
``void`` | `draw_line` | `(`const` `Gdk_GC`& `gc`, `gint` `x1`, `gint` `y1`, `gint` `x2`, `gint` `y2`)`;
``void`` | `draw_lines` | `(`const` `Gdk_GC`& `gc`, `const` `Gdk_Points`& `points`)`;
``void`` | `draw_lines` | `(`const` `Gdk_GC`& `gc`, `GdkPoint`* `points`, `gint` `npoints`)`;
``void`` | `draw_pixmap` | `(`const` `Gdk_GC`& `gc`, `const` `Gdk_Drawable`& `src`, `gint` `xsrc`, `gint` `ysrc`, `gint` `xdest`, `gint` `ydest`, `gint` `width` = -1, `gint` `height` = -1)`;
``void`` | `draw_point` | `(`const` `Gdk_GC`& `gc`, `gint` `x1`, `gint` `y1`)`;
``void`` | `draw_points` | `(`const` `Gdk_GC`& `gc`, `const` `Gdk_Points`& `points`)`;
``void`` | `draw_points` | `(`const` `Gdk_GC`& `gc`, `GdkPoint`* `points`, `gint` `npoints`)`;
``void`` | `draw_polygon` | `(`const` `Gdk_GC`& `gc`, `gint` `filled`, `const` `Gdk_Points`& `points`)`;
``void`` | `draw_polygon` | `(`const` `Gdk_GC`& `gc`, `gint` `filled`, `GdkPoint`* `points`, `gint` `npoints`)`;
``void`` | `draw_rectangle` | `(`const` `Gdk_GC`& `gc`, `gint` `filled`, `gint` `x`, `gint` `y`, `gint` `width`, `gint` `height`)`;
``void`` | `draw_segments` | `(`const` `Gdk_GC`& `gc`, `const` `Gdk_Segments`& `segs`, `gint` `nsegs`)`;
``void`` | `draw_segments` | `(`const` `Gdk_GC`& `gc`, `GdkSegment`* `segs`, `gint` `nsegs`)`;
``void`` | `draw_string` | `(`const` `Gdk_Font`& `font`, `const` `Gdk_GC`& `gc`, `gint` `x`, `gint` `y`, `const` `Gtk::string`& `str`)`;
``void`` | `draw_text` | `(`const` `Gdk_Font`& `font`, `const` `Gdk_GC`& `gc`, `gint` `x`, `gint` `y`, `const` `char`* `text`, `gint` `text_length`)`;
``void`` | `draw_text_wc` | `(`const` `Gdk_Font`& `font`, `const` `Gdk_GC`& `gc`, `gint` `x`, `gint` `y`, `const` `GdkWChar`* `text`, `gint` `text_length`)`;
``void`` | `get_position` | `(`gint`& `x`, `gint`& `y`)`;
``void`` | `get_size` | `(`gint`& `width`, `gint`& `height`)`;
``GdkWindowType`` | `get_type` | `()`;
``gpointer`` | `get_user_data` | `()`;
``Gdk_Visual`` | `get_visual` | `()`;
``gint`` | `height` | `()`;
``Gdk_Drawable`&` | `operator``=` | `(`const` `Gdk_Drawable`&)`;
``void`` | `release` | `()`;
``void`` | `set_data` | `(`const` `Gtk::string`& `key`, `gpointer` `data`, `GDestroyNotify` `destroy_func`)`;
``void`` | `set_user_data` | `(`gpointer` `data`)`;
``gint`` | `width` | `()`;
``gint`` | `x` | `()`;
``gint`` | `y` | `()`;
``virtual`` | `~Gdk_Drawable` | `()`;
### protected function member index:
`` | `Gdk_Drawable` | `()`;
``virtual` `void`` | `ref` | `()`;
``virtual` `void`` | `unref` | `()`;

## Description:

A drawable is a base class for all of the objects that accept drawing commands. The available drawables include pixmaps, windows, and bitmaps. Drawable is an abstract as there is no such type on the server side.

To use a drawable, create a concrete drawable of the type you wish to use and a GC (graphics context) for that drawable. With the GC you can draw lines, strings, arcs and such.

## Function Member Descriptions:

Gdk_Drawable::draw_arc - Draw an arc.

``void`` `draw_arc``(`const` `Gdk_GC`& `gc`, `gint` `filled`, `gint` `x`, `gint` `y`, `gint` `width`, `gint` `height`, `gint` `angle1`, `gint` `angle2`)`;
Gdk_Drawable::draw_bitmap - Draw a bitmap.

``void`` `draw_bitmap``(`const` `Gdk_GC`& `gc`, `const` `Gdk_Bitmap`& `src`, `gint` `xsrc`, `gint` `ysrc`, `gint` `xdest`, `gint` `ydest`, `gint` `width` = -1, `gint` `height` = -1)`;
Gdk_Drawable::draw_image - Draw an image.

``void`` `draw_image``(`const` `Gdk_GC`& `gc`, `const` `Gdk_Image`& `image`, `gint` `xsrc`, `gint` `ysrc`, `gint` `xdest`, `gint` `ydest`, `gint` `width` = -1, `gint` `height` = -1)`;
Gdk_Drawable::draw_line - Draw a line.

``void`` `draw_line``(`const` `Gdk_GC`& `gc`, `gint` `x1`, `gint` `y1`, `gint` `x2`, `gint` `y2`)`;
Gdk_Drawable::draw_lines - Draw a set of lines.

``void`` `draw_lines``(`const` `Gdk_GC`& `gc`, `const` `Gdk_Points`& `points`)`;

> Draws a set of connected lines.

Gdk_Drawable::draw_lines - Draw a set of lines.

``void`` `draw_lines``(`const` `Gdk_GC`& `gc`, `GdkPoint`* `points`, `gint` `npoints`)`;

> Draws a set of connected lines.

Gdk_Drawable::draw_pixmap - Draw a pixmap.

``void`` `draw_pixmap``(`const` `Gdk_GC`& `gc`, `const` `Gdk_Drawable`& `src`, `gint` `xsrc`, `gint` `ysrc`, `gint` `xdest`, `gint` `ydest`, `gint` `width` = -1, `gint` `height` = -1)`;
Gdk_Drawable::draw_point - Draw a point.

``void`` `draw_point``(`const` `Gdk_GC`& `gc`, `gint` `x1`, `gint` `y1`)`;
Gdk_Drawable::draw_points - Draw a set of points.

``void`` `draw_points``(`const` `Gdk_GC`& `gc`, `const` `Gdk_Points`& `points`)`;

> Draws a set of unconnected points.

Gdk_Drawable::draw_points - Draw a set of points.

``void`` `draw_points``(`const` `Gdk_GC`& `gc`, `GdkPoint`* `points`, `gint` `npoints`)`;

> Draws a set of unconnected points.

Gdk_Drawable::draw_polygon - Draw a polygon.

``void`` `draw_polygon``(`const` `Gdk_GC`& `gc`, `gint` `filled`, `const` `Gdk_Points`& `points`)`;
Gdk_Drawable::draw_polygon - Draw a polygon.

``void`` `draw_polygon``(`const` `Gdk_GC`& `gc`, `gint` `filled`, `GdkPoint`* `points`, `gint` `npoints`)`;
Gdk_Drawable::draw_rectangle - Draw a rectangle.

``void`` `draw_rectangle``(`const` `Gdk_GC`& `gc`, `gint` `filled`, `gint` `x`, `gint` `y`, `gint` `width`, `gint` `height`)`;

> Depending on the GC it may be filled or unfilled.

Gdk_Drawable::draw_string - Draw a string.

``void`` `draw_string``(`const` `Gdk_Font`& `font`, `const` `Gdk_GC`& `gc`, `gint` `x`, `gint` `y`, `const` `Gtk::string`& `str`)`;

> Requires a valid font in addition to a GC.

Gdk_Drawable::draw_text - Draw text.

``void`` `draw_text``(`const` `Gdk_Font`& `font`, `const` `Gdk_GC`& `gc`, `gint` `x`, `gint` `y`, `const` `char`* `text`, `gint` `text_length`)`;

> requires a string, font, and length in addition to a GC.