Cairo_gtkIntegration of Cairo with labgtk2.
It allows to create Cairo contexts which can be used to draw on GDK drawables. Additional functions allow to convert GDK's rectangles and regions into Cairo paths and to use pixbufs as sources for drawing operations.
val create : [> `drawable ] Gobject.obj -> Cairo.contextcreate drawable creates a Cairo context for drawing to drawable.
NOTE: due to double-buffering, Cairo contexts created in a GTK+ expose event handler cannot be cached and reused between different expose events.
val set_source_color : Cairo.context -> Gdk.color -> unitset_source_color cr color sets the specified color as the source color of cr.
val rectangle : Cairo.context -> Gdk.Rectangle.t -> unitrectangle cr r adds the rectangle r to the current path of cr.
val region : Cairo.context -> Gdk.region -> unitregion cr r adds the region r to the current path of cr.
val set_source_pixbuf :
Cairo.context ->
GdkPixbuf.pixbuf ->
x:float ->
y:float ->
unitSets the given pixbuf as the source pattern for the Cairo context. The pattern has an extend mode of Cairo.Pattern.extend set to NONE and is aligned so that the origin of pixbuf is (x,y).