W Wrapl, The Programming Language

Libraries:Gtk:Gdk:Pixbuf

Types

T

Inherits from:

Constants

Nil : T

Functions

ErrorQuark() : Std.Integer.SmallT



FromPixdata(pixdata @ Gtk.Gdk.Pixdata.T, copy_pixels @ Std.Symbol.T, error @ Std.Object.T) : Gtk.Gdk.Pixbuf.T



GetFileInfo(filename @ Std.String.T, width @ Std.Object.T, height @ Std.Object.T) : Gtk.Gdk.PixbufFormat.T



GetFormats() : Std.Object.T



GetType() : Gtk.GObject.Type.T



New(colorspace @ Gtk.Gdk.Colorspace.T, has_alpha @ Std.Symbol.T, bits_per_sample @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Gtk.Gdk.Pixbuf.T



NewFromData(data @ Std.String.T, colorspace @ Gtk.Gdk.Colorspace.T, has_alpha @ Std.Symbol.T, bits_per_sample @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, rowstride @ Std.Integer.SmallT, destroy_fn @ Std.Function.T, destroy_fn_data @ Std.Address.T) : Gtk.Gdk.Pixbuf.T



NewFromFile(filename @ Std.String.T, error @ Std.Object.T) : Gtk.Gdk.Pixbuf.T



NewFromFileAtScale(filename @ Std.String.T, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, preserve_aspect_ratio @ Std.Symbol.T, error @ Std.Object.T) : Gtk.Gdk.Pixbuf.T



NewFromFileAtSize(filename @ Std.String.T, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, error @ Std.Object.T) : Gtk.Gdk.Pixbuf.T



NewFromInline(data_length @ Std.Integer.SmallT, data @ Std.Object.T, copy_pixels @ Std.Symbol.T, error @ Std.Object.T) : Gtk.Gdk.Pixbuf.T



NewFromStream(stream @ Gtk.Gio.GInputStream.T, cancellable @ Gtk.Gio.GCancellable.T, error @ Std.Object.T) : Gtk.Gdk.Pixbuf.T



NewFromStreamAsync(stream @ Gtk.Gio.GInputStream.T, cancellable @ Gtk.Gio.GCancellable.T, callback @ Std.Function.T, user_data @ Std.Object.T) : Gtk.Gdk.Pixbuf.T



NewFromStreamAtScale(stream @ Gtk.Gio.GInputStream.T, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, preserve_aspect_ratio @ Std.Symbol.T, cancellable @ Gtk.Gio.GCancellable.T, error @ Std.Object.T) : Gtk.Gdk.Pixbuf.T



NewFromStreamAtScaleAsync(stream @ Gtk.Gio.GInputStream.T, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, preserve_aspect_ratio @ Std.Symbol.T, cancellable @ Gtk.Gio.GCancellable.T, callback @ Std.Function.T, user_data @ Std.Object.T) : Gtk.Gdk.Pixbuf.T



NewFromStreamFinish(async_result @ Gtk.Gio.GAsyncResult.T, error @ Std.Object.T) : Gtk.Gdk.Pixbuf.T



NewFromXpmData(data @ Std.Object.T) : Gtk.Gdk.Pixbuf.T



NewSubpixbuf(src_pixbuf @ Gtk.Gdk.Pixbuf.T, src_x @ Std.Integer.SmallT, src_y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Gtk.Gdk.Pixbuf.T



SaveToStreamFinish(async_result @ Gtk.Gio.GAsyncResult.T, error @ Std.Object.T) : Std.Symbol.T



Methods

:AddAlpha(self @ T, substitute_color @ Std.Symbol.T, r @ Std.Integer.SmallT, g @ Std.Integer.SmallT, b @ Std.Integer.SmallT) : Gtk.Gdk.Pixbuf.T



:ApplyEmbeddedOrientation(self @ T) : Gtk.Gdk.Pixbuf.T



:Composite(self @ T, dest @ Gtk.Gdk.Pixbuf.T, dest_x @ Std.Integer.SmallT, dest_y @ Std.Integer.SmallT, dest_width @ Std.Integer.SmallT, dest_height @ Std.Integer.SmallT, offset_x @ Std.Real.T, offset_y @ Std.Real.T, scale_x @ Std.Real.T, scale_y @ Std.Real.T, interp_type @ Gtk.Gdk.InterpType.T, overall_alpha @ Std.Integer.SmallT) : Std.Object.T



:CompositeColor(self @ T, dest @ Gtk.Gdk.Pixbuf.T, dest_x @ Std.Integer.SmallT, dest_y @ Std.Integer.SmallT, dest_width @ Std.Integer.SmallT, dest_height @ Std.Integer.SmallT, offset_x @ Std.Real.T, offset_y @ Std.Real.T, scale_x @ Std.Real.T, scale_y @ Std.Real.T, interp_type @ Gtk.Gdk.InterpType.T, overall_alpha @ Std.Integer.SmallT, check_x @ Std.Integer.SmallT, check_y @ Std.Integer.SmallT, check_size @ Std.Integer.SmallT, color1 @ Std.Integer.SmallT, color2 @ Std.Integer.SmallT) : Std.Object.T



:CompositeColorSimple(self @ T, dest_width @ Std.Integer.SmallT, dest_height @ Std.Integer.SmallT, interp_type @ Gtk.Gdk.InterpType.T, overall_alpha @ Std.Integer.SmallT, check_size @ Std.Integer.SmallT, color1 @ Std.Integer.SmallT, color2 @ Std.Integer.SmallT) : Gtk.Gdk.Pixbuf.T



:Copy(self @ T) : Gtk.Gdk.Pixbuf.T



:CopyArea(self @ T, src_x @ Std.Integer.SmallT, src_y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, dest_pixbuf @ Gtk.Gdk.Pixbuf.T, dest_x @ Std.Integer.SmallT, dest_y @ Std.Integer.SmallT) : Std.Object.T



:Fill(self @ T, pixel @ Std.Integer.SmallT) : Std.Object.T



:Flip(self @ T, horizontal @ Std.Symbol.T) : Gtk.Gdk.Pixbuf.T



:GetBitsPerSample(self @ T) : Std.Integer.SmallT



:GetColorspace(self @ T) : Gtk.Gdk.Colorspace.T



:GetFromDrawable(self @ T, src @ Gtk.Gdk.Drawable.T, cmap @ Gtk.Gdk.Colormap.T, src_x @ Std.Integer.SmallT, src_y @ Std.Integer.SmallT, dest_x @ Std.Integer.SmallT, dest_y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Gtk.Gdk.Pixbuf.T

Transfers image data from a Gtk.Gdk.Drawable.T and converts it to an RGB(A) representation inside a T. In other words, copies image data from a server-side drawable to a client-side RGB(A) buffer. This allows you to efficiently read individual pixels on the client side.

If the drawable src has no colormap (Gtk.Gdk.Drawable.GetColormap returns NULL), then a suitable colormap must be specified. Typically a Gtk.Gdk.Window.T or a pixmap created by passing a Gtk.Gdk.Window.T to gdk_pixmap_new() will already have a colormap associated with it. If the drawable has a colormap, the cmap argument will be ignored. If the drawable is a bitmap (1 bit per pixel pixmap), then a colormap is not required; pixels with a value of 1 are assumed to be white, and pixels with a value of 0 are assumed to be black. For taking screenshots, Gtk.Gdk.Colormap.GetSystem returns the correct colormap to use.

If the specified destination pixbuf dest is NULL, then this function will create an RGB pixbuf with 8 bits per channel and no alpha, with the same size specified by the width and height arguments. In this case, the dest_x and dest_y arguments must be specified as 0. If the specified destination pixbuf is not NULL and it contains alpha information, then the filled pixels will be set to full opacity (alpha = 255).

If the specified drawable is a pixmap, then the requested source rectangle must be completely contained within the pixmap, otherwise the function will return NULL. For pixmaps only (not for windows) passing -1 for width or height is allowed to mean the full width or height of the pixmap.

If the specified drawable is a window, and the window is off the screen, then there is no image data in the obscured/offscreen regions to be placed in the pixbuf. The contents of portions of the pixbuf corresponding to the offscreen region are undefined.

If the window you're obtaining data from is partially obscured by other windows, then the contents of the pixbuf areas corresponding to the obscured regions are undefined.

If the target drawable is not mapped (typically because it's iconified/minimized or not on the current workspace), then NULL will be returned.

If memory can't be allocated for the return value, NULL will be returned instead.

(In short, there are several ways this function can fail, and if it fails it returns NULL; so check the return value.)

This function calls Gtk.Gdk.Drawable.GetImage internally and converts the resulting image to a T, so the documentation for Gtk.Gdk.Drawable.GetImage may also be relevant.

dest Destination pixbuf, or NULL if a new pixbuf should be created. [allow-none]
src Source drawable.
cmap A colormap if src doesn't have one set.
src_x Source X coordinate within drawable.
src_y Source Y coordinate within drawable.
dest_x Destination X coordinate in pixbuf, or 0 if dest is NULL.
dest_y Destination Y coordinate in pixbuf, or 0 if dest is NULL.
width Width in pixels of region to get.
height Height in pixels of region to get.
Returns The same pixbuf as dest if it was non-NULL, or a newly-created pixbuf with a reference count of 1 if no destination pixbuf was specified, or NULL on error


:GetFromImage(self @ T, src @ Gtk.Gdk.Image.T, cmap @ Gtk.Gdk.Colormap.T, src_x @ Std.Integer.SmallT, src_y @ Std.Integer.SmallT, dest_x @ Std.Integer.SmallT, dest_y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT) : Gtk.Gdk.Pixbuf.T

Same as GetFromDrawable but gets the pixbuf from an image.

dest Destination pixbuf, or NULL if a new pixbuf should be created. [allow-none]
src Source Gtk.Gdk.Image.T.
cmap A colormap, or NULL to use the one for src. [allow-none]
src_x Source X coordinate within drawable.
src_y Source Y coordinate within drawable.
dest_x Destination X coordinate in pixbuf, or 0 if dest is NULL.
dest_y Destination Y coordinate in pixbuf, or 0 if dest is NULL.
width Width in pixels of region to get.
height Height in pixels of region to get.
Returns dest, newly-created pixbuf if dest was NULL, NULL on error


:GetHasAlpha(self @ T) : Std.Symbol.T



:GetHeight(self @ T) : Std.Integer.SmallT



:GetNChannels(self @ T) : Std.Integer.SmallT



:GetOption(self @ T, key @ Std.String.T) : Std.String.T



:GetPixels(self @ T) : Std.Address.T



:GetRowstride(self @ T) : Std.Integer.SmallT



:GetWidth(self @ T) : Std.Integer.SmallT



:Ref(self @ T) : Gtk.Gdk.Pixbuf.T



:RenderPixmapAndMask(self @ T, pixmap_return @ Std.Object.T, mask_return @ Std.Object.T, alpha_threshold @ Std.Integer.SmallT) : Std.Object.T

Creates a pixmap and a mask bitmap which are returned in the pixmap_return and mask_return arguments, respectively, and renders a pixbuf and its corresponding thresholded alpha mask to them. This is merely a convenience function; applications that need to render pixbufs with dither offsets or to given drawables should use Gtk.Gdk.Drawable.DrawPixbuf and RenderThresholdAlpha.

The pixmap that is created is created for the colormap returned by Gtk.Gdk.Rgb.GetColormap. You normally will want to instead use the actual colormap for a widget, and use RenderPixmapAndMaskForColormap.

If the pixbuf does not have an alpha channel, then *mask_return will be set to NULL.

pixbuf A pixbuf.
pixmap_return Location to store a pointer to the created pixmap, or NULL if the pixmap is not needed.
mask_return Location to store a pointer to the created mask, or NULL if the mask is not needed.
alpha_threshold Threshold value for opacity values.


:RenderPixmapAndMaskForColormap(self @ T, colormap @ Gtk.Gdk.Colormap.T, pixmap_return @ Std.Object.T, mask_return @ Std.Object.T, alpha_threshold @ Std.Integer.SmallT) : Std.Object.T

Creates a pixmap and a mask bitmap which are returned in the pixmap_return and mask_return arguments, respectively, and renders a pixbuf and its corresponding tresholded alpha mask to them. This is merely a convenience function; applications that need to render pixbufs with dither offsets or to given drawables should use Gtk.Gdk.Drawable.DrawPixbuf, and RenderThresholdAlpha.

The pixmap that is created uses the Gtk.Gdk.Colormap.T specified by colormap. This colormap must match the colormap of the window where the pixmap will eventually be used or an error will result.

If the pixbuf does not have an alpha channel, then *mask_return will be set to NULL.

pixbuf A pixbuf.
colormap A Gtk.Gdk.Colormap.T
pixmap_return Location to store a pointer to the created pixmap, or NULL if the pixmap is not needed.
mask_return Location to store a pointer to the created mask, or NULL if the mask is not needed.
alpha_threshold Threshold value for opacity values.


:RenderThresholdAlpha(self @ T, bitmap @ Gtk.Gdk.Bitmap.T, src_x @ Std.Integer.SmallT, src_y @ Std.Integer.SmallT, dest_x @ Std.Integer.SmallT, dest_y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, alpha_threshold @ Std.Integer.SmallT) : Std.Object.T

Takes the opacity values in a rectangular portion of a pixbuf and thresholds them to produce a bi-level alpha mask that can be used as a clipping mask for a drawable.

pixbuf A pixbuf.
bitmap Bitmap where the bilevel mask will be painted to.
src_x Source X coordinate.
src_y source Y coordinate.
dest_x Destination X coordinate.
dest_y Destination Y coordinate.
width Width of region to threshold, or -1 to use pixbuf width
height Height of region to threshold, or -1 to use pixbuf height
alpha_threshold Opacity values below this will be painted as zero; all other values will be painted as one.


:RenderToDrawable(self @ T, drawable @ Gtk.Gdk.Drawable.T, gc @ Gtk.Gdk.GC.T, src_x @ Std.Integer.SmallT, src_y @ Std.Integer.SmallT, dest_x @ Std.Integer.SmallT, dest_y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, dither @ Gtk.Gdk.RgbDither.T, x_dither @ Std.Integer.SmallT, y_dither @ Std.Integer.SmallT) : Std.Object.T

Warning

RenderToDrawable has been deprecated since version 2.4 and should not be used in newly-written code. This function is obsolete. Use Gtk.Gdk.Drawable.DrawPixbuf instead.



:RenderToDrawableAlpha(self @ T, drawable @ Gtk.Gdk.Drawable.T, src_x @ Std.Integer.SmallT, src_y @ Std.Integer.SmallT, dest_x @ Std.Integer.SmallT, dest_y @ Std.Integer.SmallT, width @ Std.Integer.SmallT, height @ Std.Integer.SmallT, alpha_mode @ Gtk.Gdk.PixbufAlphaMode.T, alpha_threshold @ Std.Integer.SmallT, dither @ Gtk.Gdk.RgbDither.T, x_dither @ Std.Integer.SmallT, y_dither @ Std.Integer.SmallT) : Std.Object.T

Warning

RenderToDrawableAlpha has been deprecated since version 2.4 and should not be used in newly-written code. This function is obsolete. Use Gtk.Gdk.Drawable.DrawPixbuf instead.



:RotateSimple(self @ T, angle @ Gtk.Gdk.PixbufRotation.T) : Gtk.Gdk.Pixbuf.T



:SaturateAndPixelate(self @ T, dest @ Gtk.Gdk.Pixbuf.T, saturation @ Std.Real.T, pixelate @ Std.Symbol.T) : Std.Object.T



:Save(self @ T, filename @ Std.String.T, type @ Std.String.T, error @ Std.Object.T, ... @ Std.Object.T) : Std.Symbol.T



:SaveToBuffer(self @ T, buffer @ Agg.List.T, buffer_size @ Std.Object.T, type @ Std.String.T, error @ Std.Object.T, ... @ Std.Object.T) : Std.Symbol.T



:SaveToBufferv(self @ T, buffer @ Agg.List.T, buffer_size @ Std.Object.T, type @ Std.String.T, option_keys @ Std.Object.T, option_values @ Std.Object.T, error @ Std.Object.T) : Std.Symbol.T



:SaveToCallback(self @ T, save_func @ Std.Function.T, user_data, type @ Std.String.T, error @ Std.Object.T, ... @ Std.Object.T) : Std.Symbol.T



:SaveToCallbackv(self @ T, save_func @ Std.Function.T, user_data, type @ Std.String.T, option_keys @ Std.Object.T, option_values @ Std.Object.T, error @ Std.Object.T) : Std.Symbol.T



:SaveToStream(self @ T, stream @ Gtk.Gio.GOutputStream.T, type @ Std.String.T, cancellable @ Gtk.Gio.GCancellable.T, error @ Std.Object.T, ... @ Std.Object.T) : Std.Symbol.T



:SaveToStreamAsync(self @ T, stream @ Gtk.Gio.GOutputStream.T, type @ Std.String.T, cancellable @ Gtk.Gio.GCancellable.T, callback @ Std.Function.T, user_data @ Std.Address.T, ... @ Std.Object.T) : Std.Object.T



:Savev(self @ T, filename @ Std.String.T, type @ Std.String.T, option_keys @ Agg.List.T, option_values @ Agg.List.T, error @ Std.Object.T) : Std.Symbol.T



:Scale(self @ T, dest @ Gtk.Gdk.Pixbuf.T, dest_x @ Std.Integer.SmallT, dest_y @ Std.Integer.SmallT, dest_width @ Std.Integer.SmallT, dest_height @ Std.Integer.SmallT, offset_x @ Std.Real.T, offset_y @ Std.Real.T, scale_x @ Std.Real.T, scale_y @ Std.Real.T, interp_type @ Gtk.Gdk.InterpType.T) : Std.Object.T



:ScaleSimple(self @ T, dest_width @ Std.Integer.SmallT, dest_height @ Std.Integer.SmallT, interp_type @ Gtk.Gdk.InterpType.T) : Gtk.Gdk.Pixbuf.T



:Unref(self @ T) : Std.Object.T