Wt  4.12.1
Public Member Functions | List of all members
Wt::WPainter::Image Class Reference

An image that can be rendered on a WPainter. More...

#include <WPainter.h>

Public Member Functions

 Image (const std::string &url, int width, int height)
 Creates an image. More...
 
 Image (std::shared_ptr< WAbstractDataInfo > info, int width, int height)
 Creates an image. More...
 
 Image (const std::string &url, const std::string &file)
 Creates an image. More...
 
 Image (std::shared_ptr< WAbstractDataInfo > info)
 Creates an image. More...
 
std::string uri () const
 Returns the url.
 
const WAbstractDataInfoinfo () const
 Returns the data info of the image.
 
int width () const
 Returns the image width.
 
int height () const
 Returns the image height.
 

Detailed Description

An image that can be rendered on a WPainter.

The image is specified in terms of a URL, and the width and height.

See also
drawImage()

Constructor & Destructor Documentation

◆ Image() [1/4]

Wt::WPainter::Image::Image ( const std::string &  url,
int  width,
int  height 
)

Creates an image.

Create an image which is located at the uri, and which has dimensions width x height.

◆ Image() [2/4]

Wt::WPainter::Image::Image ( std::shared_ptr< WAbstractDataInfo info,
int  width,
int  height 
)

Creates an image.

Create an image which URI and/or file path is given by info, and which has dimensions width x height.

Note
The information required depends on the WPaintDevice used.

◆ Image() [3/4]

Wt::WPainter::Image::Image ( const std::string &  url,
const std::string &  file 
)

Creates an image.

Create an image which is located at uri which is available on the local filesystem as file. The image dimensions are retrieved from the file.

◆ Image() [4/4]

Wt::WPainter::Image::Image ( std::shared_ptr< WAbstractDataInfo info)

Creates an image.

Create an image which URI and/or file path is given by info. The image dimensions are retrieved from the file (or the URI if it is a data URI).

Note
The information required depends on the WPaintDevice used.