diff options
| author | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-03-02 21:29:52 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-03-02 21:29:52 +0000 |
| commit | 8830d1ad5ab0693313d760cc99e2df0f35c9f6d9 (patch) | |
| tree | fa4a009d301ce0558041dd2e019e86c23981aa52 /src/ui/widget/highlight-picker.cpp | |
| parent | Attempt at merging certaing features of Ponyscape to trunk (will not link) (diff) | |
| download | inkscape-8830d1ad5ab0693313d760cc99e2df0f35c9f6d9.tar.gz inkscape-8830d1ad5ab0693313d760cc99e2df0f35c9f6d9.zip | |
Updated to include (non-functional) Objects dialogue
(bzr r13090.1.6)
Diffstat (limited to 'src/ui/widget/highlight-picker.cpp')
| -rw-r--r-- | src/ui/widget/highlight-picker.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/src/ui/widget/highlight-picker.cpp b/src/ui/widget/highlight-picker.cpp index b799b5e29..bf93fa960 100644 --- a/src/ui/widget/highlight-picker.cpp +++ b/src/ui/widget/highlight-picker.cpp @@ -157,11 +157,41 @@ HighlightPicker::activate_vfunc(GdkEvent* event, return false; } - } // namespace Widget } // namespace UI } // namespace Inkscape +//should be okay to put this here +/** + * Converts GdkPixbuf's data to premultiplied ARGB. + * This function will convert a GdkPixbuf in place into Cairo's native pixel format. + * Note that this is a hack intended to save memory. When the pixbuf is in Cairo's format, + * using it with GTK will result in corrupted drawings. + */ +void +convert_pixbuf_normal_to_argb32(GdkPixbuf *pb) +{ + convert_pixels_pixbuf_to_argb32( + gdk_pixbuf_get_pixels(pb), + gdk_pixbuf_get_width(pb), + gdk_pixbuf_get_height(pb), + gdk_pixbuf_get_rowstride(pb)); +} + +/** + * Converts GdkPixbuf's data back to its native format. + * Once this is done, the pixbuf can be used with GTK again. + */ +void +convert_pixbuf_argb32_to_normal(GdkPixbuf *pb) +{ + convert_pixels_argb32_to_pixbuf( + gdk_pixbuf_get_pixels(pb), + gdk_pixbuf_get_width(pb), + gdk_pixbuf_get_height(pb), + gdk_pixbuf_get_rowstride(pb)); +} + /* Local Variables: mode:c++ |
