W Wrapl, The Programming Language

Libraries:Gtk:Gdk:Drawable

Types

T

Inherits from:

Constants

Nil : T

Functions

GetType() : Gtk.GObject.Type.T



Methods

:CopyToImage(self @ T, image @ Gtk.Gdk.Image.T, src_x @ Std.Integer.SmallT, src_y @ Std.Integer.SmallT, dest_x @ Std.Integer.SmallT, dest_y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Gtk.Gdk.Image.T

Warning

CopyToImage has been deprecated since version 2.22 and should not be used in newly-written code. Use drawable as the source and draw to a Cairo image surface if you want to download contents to the client.



:DrawArc(self @ T, gc @ Gtk.Gdk.GC.T, filled @ Std.Symbol.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, angle1 @ Std.Integer.SmallT, angle2 @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawArc has been deprecated since version 2.22 and should not be used in newly-written code. Use Gtk.Cairo.Cairo.Arc and Gtk.Cairo.Cairo.Fill or Gtk.Cairo.Cairo.Stroke instead. Note that arcs just like any drawing operation in Cairo are antialiased unless you call Gtk.Cairo.Cairo.SetAntialias.



:DrawDrawable(self @ T, gc @ Gtk.Gdk.GC.T, src @ Gtk.Gdk.Drawable.T, xsrc @ Std.Integer.SmallT, ysrc @ Std.Integer.SmallT, xdest @ Std.Integer.SmallT, ydest @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawDrawable has been deprecated since version 2.22 and should not be used in newly-written code. Use Gtk.Gdk.Cairo.SetSourcePixmap, Gtk.Cairo.Cairo.Rectangle and Gtk.Cairo.Cairo.Fill to draw pixmap on top of other drawables. Also keep in mind that the limitations on allowed sources do not apply to Cairo.



:DrawGlyphs(self @ T, gc @ Gtk.Gdk.GC.T, font @ Gtk.Pango.Font.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, glyphs @ Gtk.Pango.GlyphString.T) : Std.Object.T

Warning

DrawGlyphs has been deprecated since version 2.22 and should not be used in newly-written code. Use pango_cairo_show_glyphs() instead.



:DrawGlyphsTransformed(self @ T, gc @ Gtk.Gdk.GC.T, matrix @ Gtk.Pango.Matrix.T, font @ Gtk.Pango.Font.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, glyphs @ Gtk.Pango.GlyphString.T) : Std.Object.T

Warning

DrawGlyphsTransformed has been deprecated since version 2.22 and should not be used in newly-written code. Use pango_cairo_show_glyphs() instead.



:DrawGrayImage(self @ T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, dith @ Gtk.Gdk.RgbDither.T, buf @ Std.String.T, rowstride @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawGrayImage is deprecated and should not be used in newly-written code.



:DrawImage(self @ T, gc @ Gtk.Gdk.GC.T, image @ Gtk.Gdk.Image.T, xsrc @ Std.Integer.SmallT, ysrc @ Std.Integer.SmallT, xdest @ Std.Integer.SmallT, ydest @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawImage has been deprecated since version 2.22 and should not be used in newly-written code. Do not use Gtk.Gdk.Image.T anymore, instead use Cairo image surfaces.



:DrawIndexedImage(self @ T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, dith @ Gtk.Gdk.RgbDither.T, buf @ Std.String.T, rowstride @ Std.Integer.SmallT, cmap @ Gtk.Gdk.RgbCmap.T) : Std.Object.T

Warning

DrawIndexedImage is deprecated and should not be used in newly-written code.



:DrawLayout(self @ T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, layout @ Gtk.Pango.Layout.T) : Std.Object.T

Warning

DrawLayout is deprecated and should not be used in newly-written code.



:DrawLayoutLine(self @ T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, line @ Gtk.Pango.LayoutLine.T) : Std.Object.T

Warning

DrawLayoutLine is deprecated and should not be used in newly-written code.



:DrawLayoutLineWithColors(self @ T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, line @ Gtk.Pango.LayoutLine.T, foreground @ Gtk.Gdk.Color.T, background @ Gtk.Gdk.Color.T) : Std.Object.T

Warning

DrawLayoutLineWithColors is deprecated and should not be used in newly-written code.



:DrawLayoutWithColors(self @ T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, layout @ Gtk.Pango.Layout.T, foreground @ Gtk.Gdk.Color.T, background @ Gtk.Gdk.Color.T) : Std.Object.T

Warning

DrawLayoutWithColors is deprecated and should not be used in newly-written code.



:DrawLine(self @ T, gc @ Gtk.Gdk.GC.T, x1_ @ Std.Integer.SmallT, y1_ @ Std.Integer.SmallT, x2_ @ Std.Integer.SmallT, y2_ @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawLine has been deprecated since version 2.22 and should not be used in newly-written code. Use Gtk.Cairo.Cairo.LineTo and Gtk.Cairo.Cairo.Stroke instead. Be aware that the default line width in Cairo is 2 pixels and that your coordinates need to describe the center of the line. To draw a single pixel wide pixel-aligned line, you would use:

1
2
3
4
5
cairo_set_line_width (cr, 1.0);
cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE);
cairo_move_to (cr, 0.5, 0.5);
cairo_line_to (cr, 9.5, 0.5);
cairo_stroke (cr);


:DrawLines(self @ T, gc @ Gtk.Gdk.GC.T, points @ Gtk.Gdk.Point.T, n_points @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawLines has been deprecated since version 2.22 and should not be used in newly-written code. Use Gtk.Cairo.Cairo.LineTo and Gtk.Cairo.Cairo.Stroke instead. See the documentation of DrawLine for notes on line drawing with Cairo.



:DrawPixbuf(self @ T, gc @ Gtk.Gdk.GC.T, pixbuf @ Gtk.Gdk.Pixbuf.T, src_x @ Std.Integer.SmallT, src_y @ Std.Integer.SmallT, dest_x @ Std.Integer.SmallT, dest_y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, dither @ Gtk.Gdk.RgbDither.T, x_dither @ Std.Integer.SmallT, y_dither @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawPixbuf has been deprecated since version 2.22 and should not be used in newly-written code. Use Gtk.Gdk.Cairo.SetSourcePixbuf and Gtk.Cairo.Cairo.Paint or Gtk.Cairo.Cairo.Rectangle and Gtk.Cairo.Cairo.Fill instead.



:DrawPoint(self @ T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawPoint has been deprecated since version 2.22 and should not be used in newly-written code. Use Gtk.Cairo.Cairo.Rectangle and Gtk.Cairo.Cairo.Fill or Gtk.Cairo.Cairo.MoveTo and Gtk.Cairo.Cairo.Stroke instead.



:DrawPoints(self @ T, gc @ Gtk.Gdk.GC.T, points @ Gtk.Gdk.Point.T, n_points @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawPoints has been deprecated since version 2.22 and should not be used in newly-written code. Use n_points calls to Gtk.Cairo.Cairo.Rectangle and Gtk.Cairo.Cairo.Fill instead.



:DrawPolygon(self @ T, gc @ Gtk.Gdk.GC.T, filled @ Std.Symbol.T, points @ Gtk.Gdk.Point.T, n_points @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawPolygon has been deprecated since version 2.22 and should not be used in newly-written code. Use Gtk.Cairo.Cairo.LineTo or Gtk.Cairo.Cairo.AppendPath and Gtk.Cairo.Cairo.Fill or Gtk.Cairo.Cairo.Stroke instead.



:DrawRectangle(self @ T, gc @ Gtk.Gdk.GC.T, filled @ Std.Symbol.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawRectangle has been deprecated since version 2.22 and should not be used in newly-written code. Use Gtk.Cairo.Cairo.Rectangle and Gtk.Cairo.Cairo.Fill or Gtk.Cairo.Cairo.Stroke instead. For stroking, the same caveats for converting code apply as for DrawLine.



:DrawRgb32Image(self @ T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, dith @ Gtk.Gdk.RgbDither.T, buf @ Std.String.T, rowstride @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawRgb32Image is deprecated and should not be used in newly-written code.



:DrawRgb32ImageDithalign(self @ T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, dith @ Gtk.Gdk.RgbDither.T, buf @ Std.String.T, rowstride @ Std.Integer.SmallT, xdith @ Std.Integer.SmallT, ydith @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawRgb32ImageDithalign has been deprecated since version 2.22 and should not be used in newly-written code. Cairo handles colors automatically.



:DrawRgbImage(self @ T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, dith @ Gtk.Gdk.RgbDither.T, rgb_buf @ Std.String.T, rowstride @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawRgbImage is deprecated and should not be used in newly-written code.



:DrawRgbImageDithalign(self @ T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, dith @ Gtk.Gdk.RgbDither.T, rgb_buf @ Std.String.T, rowstride @ Std.Integer.SmallT, xdith @ Std.Integer.SmallT, ydith @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawRgbImageDithalign is deprecated and should not be used in newly-written code.



:DrawSegments(self @ T, gc @ Gtk.Gdk.GC.T, segs @ Gtk.Gdk.Segment.T, n_segs @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawSegments has been deprecated since version 2.22 and should not be used in newly-written code. Use Gtk.Cairo.Cairo.MoveTo, Gtk.Cairo.Cairo.LineTo and Gtk.Cairo.Cairo.Stroke instead. See the documentation of DrawLine for notes on line drawing with Cairo.



:DrawString(self @ T, font @ Gtk.Gdk.Font.T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, string @ Std.String.T) : Std.Object.T

Warning

DrawString has been deprecated since version 2.4 and should not be used in newly-written code. Use DrawLayout instead.



:DrawText(self @ T, font @ Gtk.Gdk.Font.T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, text @ Std.String.T, text_length @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawText has been deprecated since version 2.4 and should not be used in newly-written code. Use DrawLayout instead.



:DrawTextWc(self @ T, font @ Gtk.Gdk.Font.T, gc @ Gtk.Gdk.GC.T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, text @ Std.Object.T, text_length @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawTextWc has been deprecated since version 2.4 and should not be used in newly-written code. Use DrawLayout instead.



:DrawTrapezoids(self @ T, gc @ Gtk.Gdk.GC.T, trapezoids @ Gtk.Gdk.Trapezoid.T, n_trapezoids @ Std.Integer.SmallT) : Std.Object.T

Warning

DrawTrapezoids has been deprecated since version 2.22 and should not be used in newly-written code. Use Cairo path contruction functions and Gtk.Cairo.Cairo.Fill instead.



:GetClipRegion(self @ T) : Gtk.Gdk.Region.T

Computes the region of a drawable that potentially can be written to by drawing primitives. This region will not take into account the clip region for the GC, and may also not take into account other factors such as if the window is obscured by other windows, but no area outside of this region will be affected by drawing primitives.

drawable a T
Returns a Gtk.Gdk.Region.T. This must be freed with Gtk.Gdk.Region.Destroy when you are done.


:GetColormap(self @ T) : Gtk.Gdk.Colormap.T

Gets the colormap for drawable, if one is set; returns NULL otherwise.

drawable a T
Returns the colormap, or NULL


:GetData(self @ T, key @ Std.String.T) : Std.Address.T

Warning

GetData is deprecated and should not be used in newly-written code.



:GetDepth(self @ T) : Std.Integer.SmallT

Obtains the bit depth of the drawable, that is, the number of bits that make up a pixel in the drawable's visual. Examples are 8 bits per pixel, 24 bits per pixel, etc.

drawable a T
Returns number of bits per pixel


:GetDisplay(self @ T) : Gtk.Gdk.Display.T

Warning

GetDisplay has been deprecated since version 2.24 and should not be used in newly-written code. Use Gtk.Gdk.Window.GetDisplay instead



:GetImage(self @ T, x @ Std.Integer.SmallT, y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Gtk.Gdk.Image.T

Warning

GetImage has been deprecated since version 2.22 and should not be used in newly-written code. Use drawable as the source and draw to a Cairo image surface if you want to download contents to the client.



:GetScreen(self @ T) : Gtk.Gdk.Screen.T

Warning

GetScreen has been deprecated since version 2.24 and should not be used in newly-written code. Use Gtk.Gdk.Window.GetScreen instead



:GetSize(self @ T, width @ Std.Object.T, height @ Std.Object.T) : Std.Object.T

Warning

GetSize has been deprecated since version 2.24 and should not be used in newly-written code. Use Gtk.Gdk.Window.GetWidth and Gtk.Gdk.Window.GetHeight for GdkWindows. Use Gtk.Gdk.Pixmap.GetSize for GdkPixmaps.



:GetVisibleRegion(self @ T) : Gtk.Gdk.Region.T

Computes the region of a drawable that is potentially visible. This does not necessarily take into account if the window is obscured by other windows, but no area outside of this region is visible.

drawable a T
Returns a Gtk.Gdk.Region.T. This must be freed with Gtk.Gdk.Region.Destroy when you are done.


:GetVisual(self @ T) : Gtk.Gdk.Visual.T

Warning

GetVisual has been deprecated since version 2.24 and should not be used in newly-written code. Use Gtk.Gdk.Window.GetVisual



:Ref(self @ T) : Gtk.Gdk.Drawable.T

Warning

Ref has been deprecated since version 2.0 and should not be used in newly-written code. Use g_object_ref() instead.



:SetColormap(self @ T, colormap @ Gtk.Gdk.Colormap.T) : Std.Object.T

Sets the colormap associated with drawable. Normally this will happen automatically when the drawable is created; you only need to use this function if the drawable-creating function did not have a way to determine the colormap, and you then use drawable operations that require a colormap. The colormap for all drawables and graphics contexts you intend to use together should match. i.e. when using a Gtk.Gdk.GC.T to draw to a drawable, or copying one drawable to another, the colormaps should match.

drawable a T
colormap a Gtk.Gdk.Colormap.T


:SetData(self @ T, key @ Std.String.T, data @ Std.Address.T, destroy_func @ Std.Function.T) : Std.Object.T

Warning

SetData is deprecated and should not be used in newly-written code.



:Unref(self @ T) : Std.Object.T

Warning

Unref has been deprecated since version 2.0 and should not be used in newly-written code. Use g_object_unref() instead.