xtd 0.2.0
Loading...
Searching...
No Matches
xtd::drawing::bitmap Class Reference
Inheritance diagram for xtd::drawing::bitmap:
xtd::drawing::image xtd::object xtd::iequatable< image > xtd::interface xtd::equality_operators< type_t, equatable_t >

Definition

Encapsulates a GDI+ bitmap, which consists of the pixel data for a graphics image and its attributes. A bitmap is an object used to work with images defined by pixel data.

Encapsulates a GDI+ bitmap, which consists of the pixel data for a graphics image and its attributes....
Definition bitmap.h:26
An abstract base class that provides functionality for the bitmap and metafile descended classes.
Definition image.h:49
#define drawing_export_
Define shared library export.
Definition drawing_export.h:13
Inheritance
xtd::objectxtd::drawing::imagextd::drawing::bitmap
Namespace
xtd::drawing
Library
xtd.drawing
Remarks
To draw an image on a Windows Form, you should use one of the draw_image methods.
Examples
about_box.cpp, about_dialog.cpp, about_dialog_from_executing_assembly_informations.cpp, about_dialog_system.cpp, colored_tab_pages.cpp, countries.cpp, fill_ellipse.cpp, fill_rectangle.cpp, fill_rounded_rectangle.cpp, graphics.cpp, hello_world_png.cpp, image.cpp, image_converter.cpp, image_xpm.cpp, minesweeper.cpp, painting.cpp, screenshot.cpp, status_bar.cpp, and toggle_button2.cpp.

Public Fields

static bitmap empty
 Represent an empty bitmap.
 

Public Constructors

 bitmap (const image &original)
 Initializes a new instance of the bitmap class from the specified existing image.
 
 bitmap (const image &original, const xtd::drawing::size &new_size)
 Initializes a new instance of the bitmap class from the specified existing image, scaled to the specified size.
 
 bitmap (const image &original, int32 width, int32 height)
 Initializes a new instance of the bitmap class from the specified existing image, scaled to the specified size.
 
 bitmap (const image &original, const rectangle &new_rect)
 Initializes a new instance of the bitmap class from the specified existing image, scaled to the specified rectangle.
 
 bitmap (const xtd::string &filename)
 Initializes a new instance of the bitmap class from the specified file.
 
 bitmap (const xtd::string &filename, bool use_icm)
 Initializes a new instance of the bitmap class from the specified file.
 
 bitmap (std::istream &stream)
 Initializes a new instance of the bitmap class from the specified data stream.
 
 bitmap (std::istream &stream, bool use_icm)
 Initializes a new instance of the bitmap class from the specified data stream.
 
 bitmap (const char *const *bits)
 Initializes a new instance of the bitmap class from the specified data xpm.
 
 bitmap (int32 width, int32 height)
 Initializes a new instance of the xtd::drawing::bitmap class with the specified size.
 
 bitmap (int32 width, int32 height, const graphics &g)
 Initializes a new instance of the xtd::drawing::bitmap class with the specified size and with the resolution of the specified xtd::drawing::raphics object.
 
 bitmap (int32 width, int32 height, xtd::drawing::imaging::pixel_format format)
 Initializes a new instance of the xtd::drawing::bitmap class with the specified size.
 
 bitmap (int32 width, int32 height, int32 stride, xtd::drawing::imaging::pixel_format format, intptr scan0)
 Initializes a new instance of the xtd::drawing::bitmap class with the specified size.
 
 bitmap (const xtd::drawing::size &size)
 Initializes a new instance of the xtd::drawing::bitmap class with the specified size.
 

Public Methods

bitmap clone (const rectangle &rect) const
 Creates a copy of the section of this xtd::drawing::bitmap defined with a specified rectangle.
 
bitmap clone (const rectangle_f &rect) const
 Creates a copy of the section of this xtd::drawing::bitmap defined with a specified rectangle.
 
intptr get_hbitmap () const
 Creates a GDI bitmap object from this xtd::drawing::bitmap.
 
intptr get_hbitmap (const color &background) const
 Creates a GDI bitmap object from this xtd::drawing::bitmap.
 
intptr get_hicon () const
 Returns the handle to an icon.
 
drawing::color get_pixel (int32 x, int32 y) const
 Gets the color of the specified pixel in this bitmap.
 
xtd::drawing::imaging::bitmap_data lock_bits (const rectangle &rect, xtd::drawing::imaging::image_lock_mode flags, xtd::drawing::imaging::pixel_format format)
 Locks a xtd::drawing::bitmap into system memory.
 
xtd::drawing::imaging::bitmap_data lock_bits (const rectangle &rect, xtd::drawing::imaging::image_lock_mode flags, xtd::drawing::imaging::pixel_format format, const xtd::drawing::imaging::bitmap_data &data)
 Locks a xtd::drawing::bitmap into system memory.
 
void make_transparent ()
 Makes the default transparent color transparent for this xtd::drawing::bitmap.
 
void make_transparent (const color &transparent_color)
 Makes the specified color transparent for this xtd::drawing::bitmap.
 
void set_pixel (int32 x, int32 y, const drawing::color &color)
 Sets the color of the specified pixel in this xtd::drawing::bitmap.
 
void set_resolution (int32 x_dpi, int32 y_dpi)
 Sets the resolution for this xtd::drawing::bitmap.
 
void unlock_bits (const xtd::drawing::imaging::bitmap_data &data)
 Unlocks this xtd::drawing::bitmap from system memory.
 

Public Static Methods

static bitmap from_hicon (intptr icon)
 Creates a xtd::drawing::bitmap from a Windows handle to an icon.
 

Additional Inherited Members

- Static Public Attributes inherited from xtd::drawing::image
static image empty
 Represent an empty xtd::drawing::image.
 
- Public Member Functions inherited from xtd::drawing::image
int32 flags () const noexcept
 Gets attribute flags for the pixel data of this xtd::drawing::image.
 
std::vector< guidframe_dimentions_list () const noexcept
 Gets an array of GUIDs that represent the dimensions of frames within this image.
 
intptr handle () const noexcept
 Gets the handle of this image.
 
int32 height () const noexcept
 Gets the height, in pixels, of this image.
 
float horizontal_resolution () const noexcept
 Gets the horizontal resolution, in pixels per inch, of this image.
 
imaging::color_palette palette () const noexcept
 Gets the color palette used for this image.
 
void palette (const imaging::color_palette &palette) noexcept
 Sets the color palette used for this image.
 
const size_fphysical_dimension () const noexcept
 Gets the width and height of this image.
 
imaging::pixel_format pixel_format () const noexcept
 Gets the pixel format for this image.
 
const std::vector< int32 > & property_id_list () const noexcept
 Gets IDs of the property items stored in this image.
 
const std::vector< imaging::property_item > & property_items () const noexcept
 Gets all the property items (pieces of metadata) stored in this image.
 
const imaging::image_formatraw_format () const noexcept
 Gets the file format of this image.
 
const drawing::sizesize () const noexcept
 Gets the width and height, in pixels, of this image.
 
const std::any & tag () const noexcept
 Gets an object that provides additional data about the image.
 
void tag (const std::any &tag) noexcept
 Sets an object that provides additional data about the image.
 
float vertical_resolution () const noexcept
 Gets the vertical resolution, in pixels per inch, of this image.
 
int32 width () const noexcept
 Gets the width, in pixels, of this image.
 
image clone () const
 Creates an exact copy of this xtd::drawing::image.
 
graphics create_graphics ()
 Creates the xtd::drawing::graphics for the image.
 
bool equals (const image &image) const noexcept override
 
const xtd::byteget_alpha () const
 Gets the image alpha pointer, which represents the alpha data of the image.
 
xtd::byteget_alpha ()
 Gets the image alpha pointer, which represents the alpha data of the image.
 
xtd::drawing::rectangle_f get_bounds (xtd::drawing::graphics_unit page_unit) const noexcept
 Gets the bounds of the image in the specified unit.
 
xtd::drawing::imaging::encoder_parameters get_encoder_parameter_list (xtd::guid encoder) const noexcept
 Returns information about the parameters supported by the specified image encoder.
 
size_t get_frame_count (const xtd::drawing::imaging::frame_dimension &dimension) const
 Returns the number of frames of the specified dimension.
 
xtd::drawing::imaging::property_item get_property_item (int32 propid)
 Gets the specified property item from this xtd::drawing::image.
 
const xtd::byteget_rgb () const
 Gets the image data pointer, which represents the RGB data of the image.
 
xtd::byteget_rgb ()
 Gets the image data pointer, which represents the RGB data of the image.
 
xtd::drawing::image get_thmbnail_image (int32 thumb_width, int32 thunb_height) noexcept
 Returns a thumbnail for this xtd::drawing::image.
 
void rotate_flip (xtd::drawing::rotate_flip_type rotate_flip_type)
 Rotates, flips, or rotates and flips the xtd::drawing::image.
 
void save (const xtd::string &filename) const
 Saves this xtd::drawing::image to the specified file or stream.
 
void save (const xtd::string &filename, const xtd::drawing::imaging::image_format &format) const
 Saves this xtd::drawing::image to the specified file in the specified format.
 
void save (std::ostream &stream, const xtd::drawing::imaging::image_format &format) const
 Saves this image to the specified stream in the specified format.
 
virtual bool equals (const object &obj) const noexcept
 Determines whether the specified object is equal to the current object.
 
- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual size_t get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<typename object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
virtual xtd::string to_string () const noexcept
 Returns a xtd::string that represents the current object.
 
- Public Member Functions inherited from xtd::iequatable< image >
virtual bool equals (const image &) const noexcept=0
 Indicates wheth er the current object is equal to another object of the same type.
 
- Static Public Member Functions inherited from xtd::drawing::image
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
static image from_file (const xtd::string &filename)
 Creates an image from the specified file.
 
static bitmap from_hbitmap (intptr hbitmap)
 Creates a xtd::drawing::bitmap from a handle to a GDI bitmap.
 
static image from_stream (std::istream &stream)
 Creates an xtd::drawing::image from the specified data stream.
 
static image from_data (const char *const *bits)
 Creates an xtd::drawing::image from the specified data pointer.
 
static int32 get_pixel_format_size (xtd::drawing::imaging::pixel_format pixfmt) noexcept
 Returns the color depth, in number of bits per pixel, of the specified pixel format.
 
static bool is_alpha_pixel_format (xtd::drawing::imaging::pixel_format pixfmt) noexcept
 Returns a value that indicates whether the pixel format for this xtd::drawing::image contains alpha information.
 
static bool is_canonical_pixel_format (xtd::drawing::imaging::pixel_format pixfmt) noexcept
 Returns a value that indicates whether the pixel format is 32 bits per pixel.
 
static bool is_extended_pixel_format (xtd::drawing::imaging::pixel_format pixfmt) noexcept
 Returns a value that indicates whether the pixel format is 64 bits per pixel.
 
- Static Public Member Functions inherited from xtd::object
template<typename object_a_t , typename object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<typename object_a_t , typename object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 

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