2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = gdk-Cairo-Interaction.html
52 * - GdkColor* -> Color
53 * - GdkDrawable* -> Drawable
54 * - GdkPixbuf* -> Pixbuf
55 * - GdkPixmap* -> Pixmap
56 * - GdkRectangle* -> Rectangle
57 * - GdkRegion* -> Region
64 private import gdk
.gdktypes
;
66 private import lib
.gdk
;
68 private import cairoLib
.Cairo
;
69 private import gdk
.Drawable
;
70 private import gdk
.Color
;
71 private import gdk
.Pixbuf
;
72 private import gdk
.Pixmap
;
73 private import gdk
.Rectangle
;
74 private import gdk
.Region
;
79 * library that supports vector graphics and image compositing that
80 * can be used with GDK. Since 2.8, GTK+ does most of its drawing
82 * GDK does not wrap the Cairo API, instead it allows to create Cairo
83 * contexts which can be used to draw on GDK drawables. Additional
84 * functions allow to convert GDK's rectangles and regions into
85 * Cairo paths and to use pixbufs as sources for drawing operations.
94 * Creates a Cairo context for drawing to drawable.
98 * A newly created Cairo context. Free with
99 * cairo_destroy() when you are done drawing.
102 public static Cairo
create(Drawable drawable
)
104 // cairo_t* gdk_cairo_create (GdkDrawable *drawable);
105 return new Cairo( gdk_cairo_create((drawable
is null) ?
null : drawable
.getDrawableStruct()) );
109 * Sets the specified GdkColor as the source color of cr.
116 public static void setSourceColor(Cairo cr
, Color color
)
118 // void gdk_cairo_set_source_color (cairo_t *cr, GdkColor *color);
119 gdk_cairo_set_source_color((cr
is null) ?
null : cr
.getCairoStruct(), (color
is null) ?
null : color
.getColorStruct());
123 * Sets the given pixbuf as the source pattern for the Cairo context.
124 * The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned
125 * so that the origin of pixbuf is pixbuf_x, pixbuf_y
131 * X coordinate of location to place upper left corner of pixbuf
133 * Y coordinate of location to place upper left corner of pixbuf
136 public static void setSourcePixbuf(Cairo cr
, Pixbuf pixbuf
, double pixbufX
, double pixbufY
)
138 // void gdk_cairo_set_source_pixbuf (cairo_t *cr, GdkPixbuf *pixbuf, double pixbuf_x, double pixbuf_y);
139 gdk_cairo_set_source_pixbuf((cr
is null) ?
null : cr
.getCairoStruct(), (pixbuf
is null) ?
null : pixbuf
.getPixbufStruct(), pixbufX
, pixbufY
);
143 * Sets the given pixmap as the source pattern for the Cairo context.
144 * The pattern has an extend mode of CAIRO_EXTEND_NONE and is aligned
145 * so that the origin of pixbuf is pixbuf_x, pixbuf_y
151 * X coordinate of location to place upper left corner of pixmap
153 * Y coordinate of location to place upper left corner of pixmap
156 public static void setSourcePixmap(Cairo cr
, Pixmap pixmap
, double pixmapX
, double pixmapY
)
158 // void gdk_cairo_set_source_pixmap (cairo_t *cr, GdkPixmap *pixmap, double pixmap_x, double pixmap_y);
159 gdk_cairo_set_source_pixmap((cr
is null) ?
null : cr
.getCairoStruct(), (pixmap
is null) ?
null : pixmap
.getPixmapStruct(), pixmapX
, pixmapY
);
163 * Adds the given rectangle to the current path of cr.
170 public static void rectangle(Cairo cr
, Rectangle rectangle
)
172 // void gdk_cairo_rectangle (cairo_t *cr, GdkRectangle *rectangle);
173 gdk_cairo_rectangle((cr
is null) ?
null : cr
.getCairoStruct(), (rectangle
is null) ?
null : rectangle
.getRectangleStruct());
177 * Adds the given region to the current path of cr.
184 public static void region(Cairo cr
, Region region
)
186 // void gdk_cairo_region (cairo_t *cr, GdkRegion *region);
187 gdk_cairo_region((cr
is null) ?
null : cr
.getCairoStruct(), (region
is null) ?
null : region
.getRegionStruct());