gdk-Drawing-Primitives {RGtk2} | R Documentation

## Drawing Primitives

### Description

Functions for drawing points, lines, arcs, and text

### Methods and Functions

`gdkDrawableSetData(object, key, data)`
`gdkDrawableGetData(object, key)`
`gdkDrawableGetDisplay(object)`
`gdkDrawableGetScreen(object)`
`gdkDrawableGetVisual(object)`
`gdkDrawableSetColormap(object, colormap)`
`gdkDrawableGetColormap(object)`
`gdkDrawableGetDepth(object)`
`gdkDrawableGetSize(object)`
`gdkDrawableGetClipRegion(object)`
`gdkDrawableGetVisibleRegion(object)`
`gdkDrawPoint(object, gc, x, y)`
`gdkDrawPoints(object, gc, points)`
`gdkDrawLine(object, gc, x1, y1, x2, y2)`
`gdkDrawLines(object, gc, points)`
`gdkDrawPixbuf(object, gc = NULL, pixbuf, src.x, src.y, dest.x, dest.y, width = -1, height = -1, dither = "GDK_RGB_DITHER_NORMAL", x.dither = 0, y.dither = 0)`
`gdkDrawSegments(object, gc, segs)`
`gdkDrawRectangle(object, gc, filled, x, y, width, height)`
`gdkDrawArc(object, gc, filled, x, y, width, height, angle1, angle2)`
`gdkDrawPolygon(object, gc, filled, points)`
`gdkDrawTrapezoids(drawable, gc, trapezoids)`
`gdkDrawGlyphs(object, gc, font, x, y, glyphs)`
`gdkDrawGlyphsTransformed(drawable, gc, matrix, font, x, y, glyphs)`
`gdkDrawLayoutLine(object, gc, x, y, line)`
`gdkDrawLayoutLineWithColors(drawable, gc, x, y, line, foreground, background)`
`gdkDrawLayout(object, gc, x, y, layout)`
`gdkDrawLayoutWithColors(drawable, gc, x, y, layout, foreground, background)`
`gdkDrawString(object, font, gc, x, y, string)`
`gdkDrawText(object, font, gc, x, y, text, text.length)`
`gdkDrawTextWc(object, font, gc, x, text)`
`gdkDrawDrawable(object, gc, src, xsrc, ysrc, xdest, ydest, width, height)`
`gdkDrawImage(object, gc, image, xsrc, ysrc, xdest, ydest, width, height)`
`gdkDrawableGetImage(object, x, y, width, height)`
`gdkDrawableCopyToImage(object, image = NULL, src.x, src.y, dest.x, dest.y, width, height)`

### Hierarchy

    GObject
       +----GdkDrawable
             +----GdkWindow
             +----GdkPixmap

### Detailed Description

These functions provide support for drawing points, lines, arcs and text onto what are called 'drawables'. Drawables, as the name suggests, are things which support drawing onto them, and are either `GdkWindow` or `GdkPixmap` objects.

Many of the drawing operations take a `GdkGC` argument, which represents a graphics context. This `GdkGC` contains a number of drawing attributes such as foreground color, background color and line width, and is used to reduce the number of arguments needed for each drawing operation. See the Graphics Contexts section for more information.

Some of the drawing operations take Pango data structures like `PangoContext`, `PangoLayout` or `PangoLayoutLine` as arguments. If you're using GTK+, the ususal way to obtain these structures is via `gtkWidgetCreatePangoContext` or `gtkWidgetCreatePangoLayout`.

### Structures

`GdkDrawable`

  An opaque structure representing an object that can be drawn onto. This can be a `GdkPixmap`, a `GdkBitmap`, or a `GdkWindow`.

`GdkSegment`

  Specifies the start and end point of a line for use by the `gdkDrawSegments` function. `GdkSegment` is a transparent-type.

  `x1`

    [integer] the x coordinate of the start point.

  `y1`

    [integer] the y coordinate of the start point.

  `x2`

    [integer] the x coordinate of the end point.

  `y2`

    [integer] the y coordinate of the end point.

`GdkTrapezoid`

  Specifies a trapezpoid for use by the `gdkDrawTrapezoids`. The trapezoids used here have parallel, horizontal top and bottom edges. `GdkTrapezoid` is a transparent-type.

  `y1`

    [numeric] the y coordinate of the start point.

  `x11`

    [numeric] the x coordinate of the top left corner

  `x21`

    [numeric] the x coordinate of the top right corner

  `y2`

    [numeric] the y coordinate of the end point.

  `x12`

    [numeric] the x coordinate of the bottom left corner

  `x22`

    [numeric] the x coordinate of the bottom right corner

### Author(s)

Derived by RGtkGen from GTK+ documentation

### References

https://developer.gnome.org/gdk2/stable/gdk2-Drawing-Primitives.html

[Package RGtk2 version 2.20.36.3 Index]