gdk.Cairo

Undocumented in source.

Public Imports

gtkc.gdktypes
public import gtkc.gdktypes;
Undocumented in source.

Members

Static functions

createContext
Context createContext(Window window)

Creates a Cairo context for drawing to window. Note Warning Note that calling cairo_reset_clip() on the resulting cairo_t will produce undefined results, so avoid it at all costs. Since 2.8

createSimilarImageSurface
Surface createSimilarImageSurface(Window window, cairo_format_t format, int width, int height, int scale)

Create a new image surface that is efficient to draw on the given window. Initially the surface contents are all 0 (transparent if contents have transparency, black otherwise.)

createSimilarSurface
Surface createSimilarSurface(Window window, cairo_content_t content, int width, int height)

Create a new surface that is as compatible as possible with the given window. For example the new surface will have the same fallback resolution and font options as window. Generally, the new surface will also use the same backend as window, unless that is not possible for some reason. The type of the returned surface may be examined with cairo_surface_get_type(). Initially the surface contents are all 0 (transparent if contents have transparency, black otherwise.) Since 2.22

getClipRectangle
int getClipRectangle(Context cr, Rectangle* rect)

This is a convenience function around cairo_clip_extents(). It rounds the clip extents to integer coordinates and returns a boolean indicating if a clip area exists.

rectangle
void rectangle(Context cr, Rectangle* rectangle)

Adds the given rectangle to the current path of cr. Since 2.8

region
void region(Context cr, Region region)

Adds the given region to the current path of cr. Since 2.8

regionCreateFromSurface
Region regionCreateFromSurface(Surface surface)

Creates region that describes covers the area where the given surface is more than 50% opaque. This function takes into account device offsets that might be set with cairo_surface_set_device_offset().

setSourceColor
void setSourceColor(Context cr, Color color)

Warning gdk_cairo_set_source_color has been deprecated since version 3.4 and should not be used in newly-written code. Use gdk_cairo_set_source_rgba() instead Sets the specified GdkColor as the source color of cr. Since 2.8

setSourcePixbuf
void setSourcePixbuf(Context cr, Pixbuf pixbuf, double pixbufX, double pixbufY)

Sets the given pixbuf as the source pattern for cr. The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of pixbuf is pixbuf_x, pixbuf_y. Since 2.8

setSourceRgba
void setSourceRgba(Context cr, RGBA rgba)

Sets the specified GdkRGBA as the source color of cr.

setSourceWindow
void setSourceWindow(Context cr, Window window, double x, double y)

Sets the given window as the source pattern for cr. The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned so that the origin of window is x, y. The window contains all its subwindows when rendering. Note that the contents of window are undefined outside of the visible part of window, so use this function with care. Since 2.24

surfaceCreateFromPixbuf
Surface surfaceCreateFromPixbuf(Pixbuf pixbuf, int scale, Window forWindow)

Creates an image surface with the same contents as the pixbuf.

Meta