Add gdk_cairo_set_source_pixmap. (#318805, Alexander Larsson)

2005-12-30  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.symbols:
	* gdk/gdkcairo.h:
	* gdk/gdkcairo.c: Add gdk_cairo_set_source_pixmap.  (#318805,
	Alexander Larsson)
This commit is contained in:
Matthias Clasen 2005-12-30 07:16:35 +00:00 committed by Matthias Clasen
parent 7f414f6b69
commit b19cda7c37
7 changed files with 49 additions and 2 deletions

View File

@ -1,5 +1,10 @@
2005-12-30 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk.symbols:
* gdk/gdkcairo.h:
* gdk/gdkcairo.c: Add gdk_cairo_set_source_pixmap. (#318805,
Alexander Larsson)
* gdk/gdkdisplaymanager.c (gdk_display_manager_set_property): Call
gdk_display_manager_set_default_display() to change the default
display. (#153623, Stefan Kost)

View File

@ -1,5 +1,10 @@
2005-12-30 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk.symbols:
* gdk/gdkcairo.h:
* gdk/gdkcairo.c: Add gdk_cairo_set_source_pixmap. (#318805,
Alexander Larsson)
* gdk/gdkdisplaymanager.c (gdk_display_manager_set_property): Call
gdk_display_manager_set_default_display() to change the default
display. (#153623, Stefan Kost)

View File

@ -1,3 +1,7 @@
2005-12-30 Matthias Clasen <mclasen@redhat.com>
* gdk/gdk-sections.txt: Add gdk_cairo_set_source_pixmap
2005-12-29 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkmain.sgml: Add deprecation note to

View File

@ -874,9 +874,10 @@ GdkPangoRendererPrivate
<TITLE>Cairo Interaction</TITLE>
<FILE>cairo_interaction</FILE>
gdk_cairo_create
gdk_cairo_set_source_color
gdk_cairo_set_source_colorg
gdk_cairo_set_source_pixbuf
gdk_cairo_rectangle
gdk_cairo_set_source_pixmap
dk_cairo_rectangle
gdk_cairo_region
</SECTION>

View File

@ -294,6 +294,7 @@ gdk_fontset_load_for_display
gdk_cairo_create
gdk_cairo_set_source_color
gdk_cairo_set_source_pixbuf
gdk_cairo_set_source_pixmap
gdk_cairo_rectangle
gdk_cairo_region
#endif

View File

@ -224,5 +224,32 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr,
cairo_surface_destroy (surface);
}
/**
* gdk_cairo_set_source_pixmap:
* @cr: a #Cairo context
* @pixmap: a #GdkPixmap
* @pixmap_x: X coordinate of location to place upper left corner of @pixmap
* @pixmap_y: Y coordinate of location to place upper left corner of @pixmap
*
* Sets the given pixmap as the source pattern for the Cairo context.
* 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.10
**/
void
gdk_cairo_set_source_pixmap (cairo_t *cr,
GdkPixmap *pixmap,
double pixmap_x,
double pixmap_y)
{
cairo_surface_t *surface;
surface = _gdk_drawable_ref_cairo_surface (GDK_DRAWABLE (pixmap));
cairo_set_source_surface (cr, surface, pixmap_x, pixmap_y);
cairo_surface_destroy (surface);
}
#define __GDK_CAIRO_C__
#include "gdkaliasdef.c"

View File

@ -34,6 +34,10 @@ void gdk_cairo_set_source_pixbuf (cairo_t *cr,
GdkPixbuf *pixbuf,
double pixbuf_x,
double pixbuf_y);
void gdk_cairo_set_source_pixmap (cairo_t *cr,
GdkPixmap *pixmap,
double pixmap_x,
double pixmap_y);
void gdk_cairo_rectangle (cairo_t *cr,
GdkRectangle *rectangle);