Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# pixbuf.hh File Reference

A GdkPixbuf C++ wrapper interface. More...

`#include <xfc/glib/object.hh>`
`#include <xfc/gdk/types.hh>`
`#include <gdk-pixbuf/gdk-pixbuf.h>`
`#include <gdk/gdkrgb.h>`
`#include <vector>`
`#include <xfc/gdk-pixbuf/inline/pixbuf.inl>`

## Namespaces

- namespace Xfc
- namespace Xfc::G
- namespace Xfc::Gdk

## Classes

- class Xfc::Gdk::Pixbuf
    A GdkPixbuf C++ wrapper class. More...

## Enumerations

- enum Colorspace { COLORSPACE_RGB = GDK_COLORSPACE_RGB }
    Defines the color spaces that are supported by the gdk-pixbuf library. More...
- enum InterpType {
  INTERP_NEAREST = GDK_INTERP_NEAREST,
  INTERP_TILES = GDK_INTERP_TILES,
  INTERP_BILINEAR = GDK_INTERP_BILINEAR,
  INTERP_HYPER = GDK_INTERP_HYPER
  }
    Describes the different interpolation modes that can be used with the scaling functions. More...
- enum PixbufRotation {
  PIXBUF_ROTATE_NONE = GDK_PIXBUF_ROTATE_NONE,
  PIXBUF_ROTATE_COUNTERCLOCKWISE = GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE,
  PIXBUF_ROTATE_UPSIDEDOWN = GDK_PIXBUF_ROTATE_UPSIDEDOWN,
  PIXBUF_ROTATE_CLOCKWISE = GDK_PIXBUF_ROTATE_CLOCKWISE
  }
    The possible rotations which can be passed to rotate_simple(). More...
- enum PixbufAlphaMode {
  PIXBUF_ALPHA_BILEVEL = GDK_PIXBUF_ALPHA_BILEVEL,
  PIXBUF_ALPHA_FULL = GDK_PIXBUF_ALPHA_FULL
  }
    These values can be passed to render_to_drawable_alpha() to control how the alpha chanel of an image should be handled. More...

## Detailed Description

A GdkPixbuf C++ wrapper interface.

Pixbuf is an object that contains information that describes an image in memory.

## Enumeration Type Documentation

enum Colorspace

Defines the color spaces that are supported by the gdk-pixbuf library.

Currently only RGB is supported.

Enumeration values:

  COLORSPACE_RGB | Indicates a red/green/blue additive color space.

enum InterpType

Describes the different interpolation modes that can be used with the scaling functions.

INTERP_NEAREST is the fastest scaling method, but has horrible quality when scaling down. INTERP_BILINEAR is the best choice if you aren't sure what to choose, it has a good speed/quality balance.

Note: Cubic filtering is missing from the list; hyperbolic interpolation is just as fast and results in higher quality.

Enumeration values:

  INTERP_NEAREST | Nearest neighbor sampling; this is the fastest and lowest quality mode; Quality is normally unacceptable when scaling down, but may be OK when scaling up.
  INTERP_TILES | This is an accurate simulation of the PostScript image operator without any interpolation enabled; Each pixel is rendered as a tiny parallelogram of solid color, the edges of which are implemented with antialiasing; It resembles nearest neighbor for enlargement, and bilinear for reduction.
  INTERP_BILINEAR | Best quality/speed balance; use this mode by default (bilinear interpolation); For enlargement, it is equivalent to point-sampling the ideal bilinear-interpolated image; For reduction, it is equivalent to laying down small tiles and integrating over the coverage area.
  INTERP_HYPER | This is the slowest and highest quality reconstruction function; It is derived from the hyperbolic filters in Wolberg's "Digital Image Warping", and is formally defined as the hyperbolic-filter sampling the ideal hyperbolic-filter interpolated image (the filter is designed to be idempotent for 1:1 pixel mapping).

enum PixbufAlphaMode

These values can be passed to render_to_drawable_alpha() to control how the alpha chanel of an image should be handled.

This method can create a bilevel clipping mask (black and white) and use it while pagfcng the image. In the future, when the X Window System gets an alpha channel extension, it will be possible to do full alpha compositing onto arbitrary drawables. For now both cases fall back to a bilevel clipping mask.

Enumeration values:

  PIXBUF_ALPHA_BILEVEL | A bilevel clipping mask (black and white) will be created and used to draw the image; Pixels below 0.5 opacity will be considered fully transparent, and all others will be considered fully opaque.
  PIXBUF_ALPHA_FULL | For now falls back to PIXBUF_ALPHA_BILEVEL; In the future it will do full alpha compositing.

enum PixbufRotation

The possible rotations which can be passed to rotate_simple().

To make them easier to use, their numerical values are the actual degrees.

Enumeration values:

  PIXBUF_ROTATE_NONE | No rotation.
  PIXBUF_ROTATE_COUNTERCLOCKWISE | Rotate by 90 degrees.
  PIXBUF_ROTATE_UPSIDEDOWN | Rotate by 180 degrees.
  PIXBUF_ROTATE_CLOCKWISE | Rotate by 270 degrees.

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3