Boost.UI
User Interface Boost library
Public Types | Public Member Functions | Static Public Member Functions | List of all members
boost::ui::image Class Reference

Image class. More...

Public Types

typedef void * native_handle_type
 Implementation-defined image type.
 

Public Member Functions

imageload (std::istream &s)
 Loads image from the stream. More...
 
coord_type width () const
 Returns image width. More...
 
coord_type height () const
 Returns image height. More...
 
size dimensions () const
 Returns image size. More...
 
bool valid () const noexcept
 Returns true only if image is valid.
 
native_handle_type native_handle ()
 Returns the implementation-defined underlying image handle.
 
const native_handle_type native_handle () const
 Returns the implementation-defined underlying image handle.
 

Static Public Member Functions

static image xdg (const char *name, coord_type width, coord_type height)
 Returns standard freedesktop.org (XDG) icon by name. More...
 

Detailed Description

Image class.

See also
Digital image (Wikipedia)

Member Function Documentation

◆ dimensions()

size boost::ui::image::dimensions ( ) const
inline

Returns image size.

Exceptions
std::runtime_errorOn invalid image

◆ height()

coord_type boost::ui::image::height ( ) const

Returns image height.

Exceptions
std::runtime_errorOn invalid image

◆ load()

image& boost::ui::image::load ( std::istream &  s)

Loads image from the stream.

Exceptions
std::runtime_errorOn image load failure
See also
Image file formats (Wikipedia)

◆ width()

coord_type boost::ui::image::width ( ) const

Returns image width.

Exceptions
std::runtime_errorOn invalid image

◆ xdg()

static image boost::ui::image::xdg ( const char *  name,
coord_type  width,
coord_type  height 
)
static

Returns standard freedesktop.org (XDG) icon by name.

See also
freedesktop.org Icon Naming Specification

The documentation for this class was generated from the following file: