Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class image

boost::ui::image — Image class.

Synopsis

// In header: <boost/ui/image.hpp>


class image {
public:
  // types
  typedef void * native_handle_type;  // Implementation-defined image type. 

  // construct/copy/destruct
  image();
  ~image();

  // public member functions
  image & load(std::istream &);
  coord_type width() const;
  coord_type height() const;
  size dimensions() const;
  bool valid() const noexcept;

  // public static functions
  static image xdg(const char *, coord_type, coord_type);
};

Description

See Also:

Digital image (Wikipedia)

image public construct/copy/destruct

  1. image();
  2. ~image();

image public member functions

  1. image & load(std::istream & s);
    Loads image from the stream.

    See Also:

    Image file formats (Wikipedia)

    Throws:

    std::runtime_error On image load failure
  2. coord_type width() const;
    Returns image width.

    Throws:

    std::runtime_error On invalid image
  3. coord_type height() const;
    Returns image height.

    Throws:

    std::runtime_error On invalid image
  4. size dimensions() const;
    Returns image size.

    Throws:

    std::runtime_error On invalid image
  5. bool valid() const noexcept;
    Returns true only if image is valid.

image public static functions

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

    See Also:

    freedesktop.org Icon Naming Specification


PrevUpHomeNext