Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Public Member Functions | Static Public Member Functions
Xfc::Gdk::PixbufFormat Class Reference

A GdkPixbufFormat C++ wrapper class. More...

#include <xfc/gdk-pixbuf/pixbuf-io.hh>

Inheritance diagram for Xfc::Gdk::PixbufFormat:
Xfc::Object Xfc::Trackable

List of all members.

Public Member Functions

Constructors

Static Public Member Functions


Detailed Description

A GdkPixbufFormat C++ wrapper class.

PixbufFormat contains information about the image format accepted by a module.


Constructor & Destructor Documentation

Xfc::Gdk::PixbufFormat::PixbufFormat ( GdkPixbufFormat *  format) [explicit]

Construct a new PixbufFormat from an existing GdkPixbufFormat.

Parameters:
formatA pointer to a GdkPixbufFormat.

Member Function Documentation

Gets the filename extensions typically used for files in the given format.

Returns:
A vector of String holding the list of filename extensions.
static PixbufFormat* Xfc::Gdk::PixbufFormat::get_file_info ( const String filename,
int *  width,
int *  height 
) [static]

Parses an image file far enough to determine its format and size.

Parameters:
filenameThe name of the file to identify.
widthThe return location for the width of the image, or null.
heightThe return location for the height of the image, or null.
Returns:
A PixbufFormat object describing the image format of the file, or null if the image format wasn't recognized.
static bool Xfc::Gdk::PixbufFormat::get_formats ( std::vector< Pointer< PixbufFormat > > &  formats) [static]

Obtains the available information about the image formats supported by Gdk::Pixbuf.

Parameters:
formatsA vector of Pointer<PixbufFormat> to hold the list of the supported image formats.
Returns:
true if the vector is not empty.

Returns information about the license of the image loader for the format.

Returns:
A string describing the license of format.

The returned string should be a shorthand for a wellknown license, e.g. "LGPL", "GPL", "QPL", "GPL/QPL", or "other" to indicate some other license.

Gets the mime types supported by the format.

Returns:
A vector of String holding the list mime types.

Determines whether this image format is disabled (see set_disabled()).

Returns:
Whether this image format is disabled.

Determines whether this image format is scalable.

Returns:
Whether this image format is scalable.

If a file is in a scalable format, it is preferable to load it at the desired size, rather than loading it at the default size and scaling the resulting pixbuf to the desired size.

Determines whether pixbufs can be saved in the given format.

Returns:
true if pixbufs can be saved in the given format.
void Xfc::Gdk::PixbufFormat::set_disabled ( bool  disabled)

Disables or enables an image format.

Parameters:
disabledSet to true to disable this pixbuf format.

If a format is disabled, gdk-pixbuf won't use the image loader for this format to load images. Applications can use this to avoid using image loaders with an inappropriate license, (see get_license()).


The documentation for this class was generated from the following file:
Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC