gtkmm: Gdk::Bitmap Class Reference

Bitmaps are simply pixmaps with a depth of 1. More...

Inheritance diagram for Gdk::Bitmap:
Collaboration diagram for Gdk::Bitmap:

Static Public Member Functions

static Glib::RefPtr< Bitmapcreate (const char* data, int width, int height)
 
static Glib::RefPtr< Bitmapcreate (const Glib::RefPtr< Gdk::Drawable >& drawable, const char* data, int width, int height)
 
- Static Public Member Functions inherited from Gdk::Pixmap
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...

 
static Glib::RefPtr< Pixmapcreate (const Glib::RefPtr< Drawable >& drawable, int width, int height, int depth=-1)
 
static Glib::RefPtr< Pixmapcreate (const Glib::RefPtr< Drawable >& drawable, const char* data, int width, int height, int depth, const Color& fg, const Color& bg)
 
static Glib::RefPtr< Pixmapcreate (const Glib::RefPtr< Display >& display, NativeWindow anid)
 
static Glib::RefPtr< Pixmapcreate_from_data (const Glib::RefPtr< const Drawable >& drawable, const char* data, int width, int height, int depth, const Color& fg, const Color& bg)
 
static Glib::RefPtr< Pixmapcreate_from_xpm (const Glib::RefPtr< const Drawable >& drawable, const Color& transparent_color, const std::string& filename)
 Create a Pixmap from a xpm file. More...

 
static Glib::RefPtr< Pixmapcreate_from_xpm (const Glib::RefPtr< const Drawable >& drawable, Glib::RefPtr< Bitmap >& mask, const Color& transparent_color, const std::string& filename)
 
static Glib::RefPtr< Pixmapcreate_from_xpm (const Glib::RefPtr< const Drawable >& drawable, const Glib::RefPtr< Colormap >& colormap, Glib::RefPtr< Bitmap >& mask, const Color& transparent_color, const std::string& filename)
 Create a Pixmap from a xpm file with colormap. More...

 
static Glib::RefPtr< Pixmapcreate_from_xpm (const Glib::RefPtr< const Drawable >& drawable, Glib::RefPtr< Bitmap >& mask, const Color& transparent_color, const char* const* data)
 
static Glib::RefPtr< Pixmapcreate_from_xpm (const Glib::RefPtr< const Drawable >& drawable, const Glib::RefPtr< Colormap >& colormap, Glib::RefPtr< Bitmap >& mask, const Color& transparent_color, const char* const* data)
 
static Glib::RefPtr< Pixmapcreate_from_xpm (const Glib::RefPtr< Colormap >& colormap, Glib::RefPtr< Bitmap >& mask, const Color& transparent_color, const char* const* data)
 
static Glib::RefPtr< Pixmapcreate_from_xpm (const Glib::RefPtr< Colormap >& colormap, Glib::RefPtr< Bitmap >& mask, const char* const* data)
 
- Static Public Member Functions inherited from Gdk::Drawable
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...

 
static Glib::RefPtr< Drawablecreate ()
 

Protected Member Functions

 Bitmap (const char* data, int width, int height)
 
 Bitmap (const Glib::RefPtr< Gdk::Drawable >& drawable, const char* data, int width, int height)
 
- Protected Member Functions inherited from Gdk::Pixmap
 Pixmap ()
 
 Pixmap (const Glib::RefPtr< Drawable >& drawable, int width, int height, int depth=-1)
 
 Pixmap (const Glib::RefPtr< Drawable >& drawable, const char* data, int width, int height, int depth, const Color& fg, const Color& bg)
 Initialize a Pixmap from data. More...

 
 Pixmap (const Glib::RefPtr< Display >& display, NativeWindow anid)
 
- Protected Member Functions inherited from Gdk::Drawable
 Drawable ()
 
- Protected Member Functions inherited from Glib::Object
 Object ()
 
 Object (const Glib::ConstructParams &construct_params)
 
 Object (GObject *castitem)
 
 ~Object () noexceptoverride
 
- Protected Member Functions inherited from Glib::ObjectBase
 ObjectBase ()
 
 ObjectBase (const char *custom_type_name)
 
 ObjectBase (const std::type_info &custom_type_info)
 
 ObjectBase (ObjectBase &&src) noexcept
 
ObjectBaseoperator= (ObjectBase &&src) noexcept
 
virtual ~ObjectBase () noexcept=0
 
void initialize (GObject *castitem)
 
void initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)
 

Additional Inherited Members

- Public Types inherited from Glib::Object
typedef void(*)(gpointer data DestroyNotify)
 
- Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify func_destroy_notify
 
- Public Member Functions inherited from Gdk::Pixmap
 Pixmap (Pixmap&& src) noexcept
 
Pixmapoperator= (Pixmap&& src) noexcept
 
 ~Pixmap () noexceptoverride
 
GdkPixmap* gobj ()
 Provides access to the underlying C GObject. More...

 
const GdkPixmap* gobj () const
 Provides access to the underlying C GObject. More...

 
GdkPixmap* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...

 
- Public Member Functions inherited from Gdk::Drawable
 Drawable (Drawable&& src) noexcept
 
Drawableoperator= (Drawable&& src) noexcept
 
 ~Drawable () noexceptoverride
 
GdkDrawable* gobj ()
 Provides access to the underlying C GObject. More...

 
const GdkDrawable* gobj () const
 Provides access to the underlying C GObject. More...

 
GdkDrawable* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...

 
void get_size (int& width, int& height)
 Fills * width and * height with the size of drawable. More...

 
void get_size (int& width, int& height) const
 Fills * width and * height with the size of drawable. More...

 
int get_depth () const
 Obtains the bit depth of the drawable, that is, the number of bits that make up a pixel in the drawable's visual. More...

 
void set_colormap (const Glib::RefPtr< Colormap >& colormap)
 Sets the colormap associated with drawable. More...

 
Glib::RefPtr< Colormapget_colormap ()
 Gets the colormap for drawable, if one is set; returns nullptr otherwise. More...

 
Glib::RefPtr< Visualget_visual ()
 Gets the Gdk::Visual describing the pixel format of drawable. More...

 
void draw_point (const Glib::RefPtr< const GC >& gc, int x, int y)
 Draws a point, using the foreground color and other attributes of the Gdk::GC. More...

 
void draw_points (const Glib::RefPtr< const GC >& gc, const Glib::ArrayHandle< Point >& points)
 
void draw_line (const Glib::RefPtr< const GC >& gc, int x1, int y1, int x2, int y2)
 Draws a line, using the foreground color and other attributes of the Gdk::GC. More...

 
void draw_lines (const Glib::RefPtr< const GC >& gc, const Glib::ArrayHandle< Point >& points)
 
void draw_rectangle (const Glib::RefPtr< const GC >& gc, bool filled, int x, int y, int width, int height)
 Draws a rectangular outline or filled rectangle, using the foreground color and other attributes of the Gdk::GC. More...

 
void draw_arc (const Glib::RefPtr< const GC >& gc, bool filled, int x, int y, int width, int height, int angle1, int angle2)
 Draws an arc or a filled 'pie slice'. More...

 
void draw_polygon (const Glib::RefPtr< const GC >& gc, bool filled, const Glib::ArrayHandle< Point >& points)
 
void draw_drawable (const Glib::RefPtr< const GC >& gc, const Glib::RefPtr< const Drawable >& src, int xsrc, int ysrc, int xdest, int ydest, int width=-1, int height=-1)
 Copies the width x height region of src at coordinates ( xsrc, ysrc) to coordinates ( xdest, ydest) in drawable. More...

 
void draw_image (const Glib::RefPtr< const GC >& gc, const Glib::RefPtr< const Image >& image, int xsrc, int ysrc, int xdest, int ydest, int width=-1, int height=-1)
 Draws a Gdk::Image onto a drawable. More...

 
void draw_segments (const Glib::RefPtr< const GC >& gc, GdkSegment* segs, int nsegs)
 Draws a number of unconnected lines. More...

 
void draw_glyphs (const Glib::RefPtr< const GC >& gc, const Glib::RefPtr< const Pango::Font >& font, int x, int y, const Pango::GlyphString& glyphs)
 This is a low-level function; 99% of text rendering should be done using gdk_draw_layout() instead. More...

 
void draw_layout_line (const Glib::RefPtr< const GC >& gc, int x, int y, const Glib::RefPtr< const Pango::LayoutLine >& line)
 Render a Pango::LayoutLine onto an GDK drawable. More...

 
void draw_layout_line (const Glib::RefPtr< const GC >& gc, int x, int y, const Glib::RefPtr< const Pango::LayoutLine >& line, const Color& foreground, const Color& background)
 Render a Pango::LayoutLine onto a Gdk::Drawable, overriding the layout's normal colors with foreground and/or background. More...

 
void draw_layout (const Glib::RefPtr< const GC >& gc, int x, int y, const Glib::RefPtr< const Pango::Layout >& layout)
 Render a Pango::Layout onto a GDK drawable. More...

 
void draw_layout (const Glib::RefPtr< const GC >& gc, int x, int y, const Glib::RefPtr< const Pango::Layout >& layout, const Color& foreground, const Color& background)
 Render a Pango::Layout onto a Gdk::Drawable, overriding the layout's normal colors with foreground and/or background. More...

 
void draw_pixbuf (const Glib::RefPtr< const GC >& gc, const Glib::RefPtr< Pixbuf >& pixbuf, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither)
 Renders a rectangular portion of a pixbuf to a drawable. More...

 
void draw_pixbuf (const Glib::RefPtr< Pixbuf >& pixbuf, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither)
 Renders a rectangular portion of a pixbuf to a drawable. More...

 
Glib::RefPtr< Imageget_image (int x, int y, int width, int height) const
 A Gdk::Image stores client-side image data (pixels). More...

 
void copy_to_image (const Glib::RefPtr< Image >& image, int src_x, int src_y, int dest_x, int dest_y, int width, int height) const
 
Region get_clip_region () const
 Computes the region of a drawable that potentially can be written to by drawing primitives. More...

 
Region get_visible_region () const
 Computes the region of a drawable that is potentially visible. More...

 
void draw_rgb_image (const Glib::RefPtr< const GC >& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride)
 
void draw_rgb_image_dithalign (const Glib::RefPtr< const GC >& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride, int xdith, int ydith)
 
void draw_rgb_32_image (const Glib::RefPtr< const GC >& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride)
 
void draw_rgb_32_image_dithalign (const Glib::RefPtr< const GC >& gc, int x, int y, int width, int height, RgbDither dith, const guchar* buf, int rowstride, int xdith, int ydith)
 Like gdk_draw_rgb_32_image(), but allows you to specify the dither offsets. More...

 
void draw_gray_image (const Glib::RefPtr< const GC >& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride)
 
void draw_indexed_image (const Glib::RefPtr< const GC >& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride, const RgbCmap& cmap)
 
Glib::RefPtr< Screenget_screen ()
 Gets the Gdk::Screen associated with a Gdk::Drawable. More...

 
Glib::RefPtr< const Screenget_screen () const
 Gets the Gdk::Screen associated with a Gdk::Drawable. More...

 
Glib::RefPtr< Displayget_display ()
 Gets the Gdk::Display associated with a Gdk::Drawable. More...

 
Glib::RefPtr< const Displayget_display () const
 Gets the Gdk::Display associated with a Gdk::Drawable. More...

 
Cairo::RefPtr< Cairo::Contextcreate_cairo_context ()
 Creates a Cairo context for drawing to drawable. More...

 
- Public Member Functions inherited from Glib::Object
 Object (const Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&src) noexcept
 
Objectoperator= (Object &&src) noexcept
 
void * get_data (const QueryQuark &key)
 
void set_data (const Quark &key, void *data)
 
void set_data (const Quark &key, void *data, DestroyNotify notify)
 
void remove_data (const QueryQuark &quark)
 
void * steal_data (const QueryQuark &quark)
 
Glib::RefPtr< Glib::Objectwrap (GObject *object, bool take_copy=false)
 
- Public Member Functions inherited from Glib::ObjectBase
 ObjectBase (const ObjectBase &)=delete
 
ObjectBaseoperator= (const ObjectBase &)=delete
 
void set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
 
void get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
 
void set_property (const Glib::ustring &property_name, const PropertyType &value)
 
void get_property (const Glib::ustring &property_name, PropertyType &value) const
 
void connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
 
void connect_property_changed (const Glib::ustring &property_name, sigc::slot< void > &&slot)
 
sigc::connection connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
 
sigc::connection connect_property_changed_with_return (const Glib::ustring &property_name, sigc::slot< void > &&slot)
 
void freeze_notify ()
 
void thaw_notify ()
 
virtual void reference () const
 
virtual void unreference () const
 
GObject * gobj ()
 
const GObject * gobj () const
 
GObject * gobj_copy () const
 
- Public Member Functions inherited from sigc::trackable
 trackable () noexcept
 
 trackable (const trackable &src) noexcept
 
 trackable (trackable &&src)
 
 ~trackable ()
 
void add_destroy_notify_callback (void *data, func_destroy_notify func) const
 
void notify_callbacks ()
 
trackableoperator= (const trackable &src)
 
trackableoperator= (trackable &&src)
 
void remove_destroy_notify_callback (void *data) const
 

Detailed Description

Bitmaps are simply pixmaps with a depth of 1.

(That is, they are monochrome bitmaps - each pixel can be either on or off).

Constructor & Destructor Documentation

Gdk::Bitmap::Bitmap ( const char *  data,
int  width,
int  height 
)
protected
Gdk::Bitmap::Bitmap ( const Glib::RefPtr< Gdk::Drawable >&  drawable,
const char *  data,
int  width,
int  height 
)
protected

Member Function Documentation

static Glib::RefPtr<Bitmap> Gdk::Bitmap::create ( const char *  data,
int  width,
int  height 
)
static
static Glib::RefPtr<Bitmap> Gdk::Bitmap::create ( const Glib::RefPtr< Gdk::Drawable >&  drawable,
const char *  data,
int  width,
int  height 
)
static

The documentation for this class was generated from the following file:
  • gdkmm/bitmap.h