gdk-pixbuf-2.0 Reference Manual

Synopsis

public class Pixbuf : Object  {
    public    weak int                  bits_per_sample           { get; construct } ;
    public    weak Colorspace           colorspace                { get; construct } ;
    public    weak bool                 has_alpha                 { get; construct } ;
    public    weak int                  height                    { get; construct } ;
    public    weak int                  n_channels                { get; construct } ;
    public    weak void                 pixels                    { get; construct } ;
    public    weak int                  rowstride                 { get; construct } ;
    public    weak int                  width                     { get; construct } ;


    public                              Pixbuf                    ( Colorspace          colorspace,
                                                                    bool                has_alpha,
                                                                    int                 bits_per_sample,
                                                                    int                 width,
                                                                    int                 height ) ;
    public                              Pixbuf.from_data          ( uchar[]             data,
                                                                    Colorspace          colorspace,
                                                                    bool                has_alpha,
                                                                    int                 bits_per_sample,
                                                                    int                 width,
                                                                    int                 height,
                                                                    int                 rowstride,
                                                                    PixbufDestroyNotify destroy_fn,
                                                                    void**              destroy_fn_data ) ;
    public                              Pixbuf.from_file          ( string              filename ) 
                                                             throws GLib.Error;
    public                              Pixbuf.from_file_at_scale ( string              filename,
                                                                    int                 width,
                                                                    int                 height,
                                                                    bool                preserve_aspect_ratio ) 
                                                             throws GLib.Error;
    public                              Pixbuf.from_file_at_size  ( string              filename,
                                                                    int                 width,
                                                                    int                 height ) 
                                                             throws GLib.Error;
    public                              Pixbuf.from_inline        ( int                 data_length,
                                                                    uchar               data,
                                                                    bool                copy_pixels ) 
                                                             throws GLib.Error;
    public                              Pixbuf.from_xpm_data      ( string[]            data ) ;
    public                              Pixbuf.subpixbuf          ( Pixbuf              src_pixbuf,
                                                                    int                 src_x,
                                                                    int                 src_y,
                                                                    int                 width,
                                                                    int                 height ) ;


    public    weak Pixbuf               add_alpha                 ( bool                substitute_color,
                                                                    uchar               r,
                                                                    uchar               g,
                                                                    uchar               b ) ;
    public    weak Pixbuf               apply_embedded_orientation (  ) ;
    public    void                      composite                 ( Pixbuf              dest,
                                                                    int                 dest_x,
                                                                    int                 dest_y,
                                                                    int                 dest_width,
                                                                    int                 dest_height,
                                                                    double              offset_x,
                                                                    double              offset_y,
                                                                    double              scale_x,
                                                                    double              scale_y,
                                                                    InterpType          interp_type,
                                                                    int                 overall_alpha ) ;
    public    void                      composite_color           ( Pixbuf              dest,
                                                                    int                 dest_x,
                                                                    int                 dest_y,
                                                                    int                 dest_width,
                                                                    int                 dest_height,
                                                                    double              offset_x,
                                                                    double              offset_y,
                                                                    double              scale_x,
                                                                    double              scale_y,
                                                                    InterpType          interp_type,
                                                                    int                 overall_alpha,
                                                                    int                 check_x,
                                                                    int                 check_y,
                                                                    int                 check_size,
                                                                    uint                color1,
                                                                    uint                color2 ) ;
    public    weak Pixbuf               composite_color_simple    ( int                 dest_width,
                                                                    int                 dest_height,
                                                                    InterpType          interp_type,
                                                                    int                 overall_alpha,
                                                                    int                 check_size,
                                                                    uint                color1,
                                                                    uint                color2 ) ;
    public    weak Pixbuf               copy                      (  ) ;
    public    void                      copy_area                 ( int                 src_x,
                                                                    int                 src_y,
                                                                    int                 width,
                                                                    int                 height,
                                                                    Pixbuf              dest_pixbuf,
                                                                    int                 dest_x,
                                                                    int                 dest_y ) ;
    public    static GLib.Quark         error_quark               (  ) ;
    public    void                      fill                      ( uint                pixel ) ;
    public    weak Pixbuf               flip                      ( bool                horizontal ) ;
    public    static weak Pixbuf        from_pixdata              ( Pixdata             pixdata,
                                                                    bool                copy_pixels ) 
                                                             throws GLib.Error;
    public    int                       get_bits_per_sample       (  ) ;
    public    Colorspace                get_colorspace            (  ) ;
    public    static weak PixbufFormat  get_file_info             ( string              filename,
                                                                    int                 width,
                                                                    int                 height ) ;
    public    static weak GLib.SList    get_formats               (  ) ;
    public    bool                      get_has_alpha             (  ) ;
    public    int                       get_height                (  ) ;
    public    int                       get_n_channels            (  ) ;
    public    weak string               get_option                ( string              key ) ;
    public    weak uchar[]              get_pixels                (  ) ;
    public    int                       get_rowstride             (  ) ;
    public    int                       get_width                 (  ) ;
    public    weak Pixbuf               rotate_simple             ( PixbufRotation      angle ) ;
    public    void                      saturate_and_pixelate     ( Pixbuf              dest,
                                                                    float               saturation,
                                                                    bool                pixelate ) ;
    public    bool                      save                      ( string              filename,
                                                                    string              type ) 
                                                             throws GLib.Error;
    public    bool                      save_to_buffer            ( string              buffer,
                                                                    ulong               buffer_size,
                                                                    string              type ) 
                                                             throws GLib.Error;
    public    bool                      save_to_bufferv           ( string              buffer,
                                                                    ulong               buffer_size,
                                                                    string              type,
                                                                    string[]            option_keys,
                                                                    string[]            option_values ) 
                                                             throws GLib.Error;
    public    bool                      save_to_callback          ( PixbufSaveFunc      save_func,
                                                                    string              type ) 
                                                             throws GLib.Error;
    public    bool                      save_to_callbackv         ( PixbufSaveFunc      save_func,
                                                                    string              type,
                                                                    string[]            option_keys,
                                                                    string[]            option_values ) 
                                                             throws GLib.Error;
    public    bool                      savev                     ( string              filename,
                                                                    string              type,
                                                                    weak string         option_keys,
                                                                    weak string         option_values ) 
                                                             throws GLib.Error;
    public    void                      scale                     ( Pixbuf              dest,
                                                                    int                 dest_x,
                                                                    int                 dest_y,
                                                                    int                 dest_width,
                                                                    int                 dest_height,
                                                                    double              offset_x,
                                                                    double              offset_y,
                                                                    double              scale_x,
                                                                    double              scale_y,
                                                                    InterpType          interp_type ) ;
    public    weak Pixbuf               scale_simple              ( int                 dest_width,
                                                                    int                 dest_height,
                                                                    InterpType          interp_type ) ;
}

Pixbuf Description

Details

Constructor Details

Pixbuf ()
    public                              Pixbuf                    ( Colorspace          colorspace,
                                                                    bool                has_alpha,
                                                                    int                 bits_per_sample,
                                                                    int                 width,
                                                                    int                 height ) ;		

Pixbuf.from_data ()
    public                              Pixbuf.from_data          ( uchar[]             data,
                                                                    Colorspace          colorspace,
                                                                    bool                has_alpha,
                                                                    int                 bits_per_sample,
                                                                    int                 width,
                                                                    int                 height,
                                                                    int                 rowstride,
                                                                    PixbufDestroyNotify destroy_fn,
                                                                    void**              destroy_fn_data ) ;		

Pixbuf.from_file ()
    public                              Pixbuf.from_file          ( string              filename ) 
                                                             throws GLib.Error;		

Pixbuf.from_file_at_scale ()
    public                              Pixbuf.from_file_at_scale ( string              filename,
                                                                    int                 width,
                                                                    int                 height,
                                                                    bool                preserve_aspect_ratio ) 
                                                             throws GLib.Error;		

Pixbuf.from_file_at_size ()
    public                              Pixbuf.from_file_at_size  ( string              filename,
                                                                    int                 width,
                                                                    int                 height ) 
                                                             throws GLib.Error;		

Pixbuf.from_inline ()
    public                              Pixbuf.from_inline        ( int                 data_length,
                                                                    uchar               data,
                                                                    bool                copy_pixels ) 
                                                             throws GLib.Error;		

Pixbuf.from_xpm_data ()
    public                              Pixbuf.from_xpm_data      ( string[]            data ) ;		

Pixbuf.subpixbuf ()
    public                              Pixbuf.subpixbuf          ( Pixbuf              src_pixbuf,
                                                                    int                 src_x,
                                                                    int                 src_y,
                                                                    int                 width,
                                                                    int                 height ) ;		

Field Details

Signal Details

Property Details

bits_per_sample
    public    weak int                  bits_per_sample           { get; construct } ;		

colorspace
    public    weak Colorspace           colorspace                { get; construct } ;		

has_alpha
    public    weak bool                 has_alpha                 { get; construct } ;		

height
    public    weak int                  height                    { get; construct } ;		

n_channels
    public    weak int                  n_channels                { get; construct } ;		

pixels
    public    weak void                 pixels                    { get; construct } ;		

rowstride
    public    weak int                  rowstride                 { get; construct } ;		

width
    public    weak int                  width                     { get; construct } ;		

Method Details

add_alpha ()
    public    weak Pixbuf               add_alpha                 ( bool                substitute_color,
                                                                    uchar               r,
                                                                    uchar               g,
                                                                    uchar               b ) ;		

apply_embedded_orientation ()
    public    weak Pixbuf               apply_embedded_orientation (  ) ;		

composite ()
    public    void                      composite                 ( Pixbuf              dest,
                                                                    int                 dest_x,
                                                                    int                 dest_y,
                                                                    int                 dest_width,
                                                                    int                 dest_height,
                                                                    double              offset_x,
                                                                    double              offset_y,
                                                                    double              scale_x,
                                                                    double              scale_y,
                                                                    InterpType          interp_type,
                                                                    int                 overall_alpha ) ;		

composite_color ()
    public    void                      composite_color           ( Pixbuf              dest,
                                                                    int                 dest_x,
                                                                    int                 dest_y,
                                                                    int                 dest_width,
                                                                    int                 dest_height,
                                                                    double              offset_x,
                                                                    double              offset_y,
                                                                    double              scale_x,
                                                                    double              scale_y,
                                                                    InterpType          interp_type,
                                                                    int                 overall_alpha,
                                                                    int                 check_x,
                                                                    int                 check_y,
                                                                    int                 check_size,
                                                                    uint                color1,
                                                                    uint                color2 ) ;		

composite_color_simple ()
    public    weak Pixbuf               composite_color_simple    ( int                 dest_width,
                                                                    int                 dest_height,
                                                                    InterpType          interp_type,
                                                                    int                 overall_alpha,
                                                                    int                 check_size,
                                                                    uint                color1,
                                                                    uint                color2 ) ;		

copy ()
    public    weak Pixbuf               copy                      (  ) ;		

copy_area ()
    public    void                      copy_area                 ( int                 src_x,
                                                                    int                 src_y,
                                                                    int                 width,
                                                                    int                 height,
                                                                    Pixbuf              dest_pixbuf,
                                                                    int                 dest_x,
                                                                    int                 dest_y ) ;		

error_quark ()
    public    static GLib.Quark         error_quark               (  ) ;		

fill ()
    public    void                      fill                      ( uint                pixel ) ;		

flip ()
    public    weak Pixbuf               flip                      ( bool                horizontal ) ;		

from_pixdata ()
    public    static weak Pixbuf        from_pixdata              ( Pixdata             pixdata,
                                                                    bool                copy_pixels ) 
                                                             throws GLib.Error;		

get_bits_per_sample ()
    public    int                       get_bits_per_sample       (  ) ;		

get_colorspace ()
    public    Colorspace                get_colorspace            (  ) ;		

get_file_info ()
    public    static weak PixbufFormat  get_file_info             ( string              filename,
                                                                    int                 width,
                                                                    int                 height ) ;		

get_formats ()
    public    static weak GLib.SList    get_formats               (  ) ;		

get_has_alpha ()
    public    bool                      get_has_alpha             (  ) ;		

get_height ()
    public    int                       get_height                (  ) ;		

get_n_channels ()
    public    int                       get_n_channels            (  ) ;		

get_option ()
    public    weak string               get_option                ( string              key ) ;		

get_pixels ()
    public    weak uchar[]              get_pixels                (  ) ;		

get_rowstride ()
    public    int                       get_rowstride             (  ) ;		

get_width ()
    public    int                       get_width                 (  ) ;		

rotate_simple ()
    public    weak Pixbuf               rotate_simple             ( PixbufRotation      angle ) ;		

saturate_and_pixelate ()
    public    void                      saturate_and_pixelate     ( Pixbuf              dest,
                                                                    float               saturation,
                                                                    bool                pixelate ) ;		

save ()
    public    bool                      save                      ( string              filename,
                                                                    string              type ) 
                                                             throws GLib.Error;		

save_to_buffer ()
    public    bool                      save_to_buffer            ( string              buffer,
                                                                    ulong               buffer_size,
                                                                    string              type ) 
                                                             throws GLib.Error;		

save_to_bufferv ()
    public    bool                      save_to_bufferv           ( string              buffer,
                                                                    ulong               buffer_size,
                                                                    string              type,
                                                                    string[]            option_keys,
                                                                    string[]            option_values ) 
                                                             throws GLib.Error;		

save_to_callback ()
    public    bool                      save_to_callback          ( PixbufSaveFunc      save_func,
                                                                    string              type ) 
                                                             throws GLib.Error;		

save_to_callbackv ()
    public    bool                      save_to_callbackv         ( PixbufSaveFunc      save_func,
                                                                    string              type,
                                                                    string[]            option_keys,
                                                                    string[]            option_values ) 
                                                             throws GLib.Error;		

savev ()
    public    bool                      savev                     ( string              filename,
                                                                    string              type,
                                                                    weak string         option_keys,
                                                                    weak string         option_values ) 
                                                             throws GLib.Error;		

scale ()
    public    void                      scale                     ( Pixbuf              dest,
                                                                    int                 dest_x,
                                                                    int                 dest_y,
                                                                    int                 dest_width,
                                                                    int                 dest_height,
                                                                    double              offset_x,
                                                                    double              offset_y,
                                                                    double              scale_x,
                                                                    double              scale_y,
                                                                    InterpType          interp_type ) ;		

scale_simple ()
    public    weak Pixbuf               scale_simple              ( int                 dest_width,
                                                                    int                 dest_height,
                                                                    InterpType          interp_type ) ;		


Created by Valadoc