A class representing an image read in one of the supported formats: raw, svg, png, jpg and etc. Besides the methods inherited from the Paint, it provides methods to load & draw images on the canvas.
More...
|
| Result | load (const std::string &path) noexcept |
| | Loads a picture data directly from a file. More...
|
| |
| TVG_DEPRECATED Result | load (const char *data, uint32_t size, bool copy=false) noexcept |
| | Loads a picture data from a memory block of a given size. More...
|
| |
| Result | load (const char *data, uint32_t size, const std::string &mimeType, bool copy=false) noexcept |
| | Loads a picture data from a memory block of a given size. More...
|
| |
| Result | size (float w, float h) noexcept |
| | Resizes the picture content to the given width and height. More...
|
| |
| Result | size (float *w, float *h) const noexcept |
| | Gets the size of the image. More...
|
| |
| const uint32_t * | data (uint32_t *w, uint32_t *h) const noexcept |
| | Gets the pixels information of the picture. More...
|
| |
| Result | load (uint32_t *data, uint32_t w, uint32_t h, bool copy) noexcept |
| | Loads a raw data from a memory block with a given size. More...
|
| |
| Result | viewbox (float *x, float *y, float *w, float *h) const noexcept |
| | Gets the position and the size of the loaded SVG picture. More...
|
| |
| Result | rotate (float degree) noexcept |
| | Sets the angle by which the object is rotated. More...
|
| |
| Result | scale (float factor) noexcept |
| | Sets the scale value of the object. More...
|
| |
| Result | translate (float x, float y) noexcept |
| | Sets the values by which the object is moved in a two-dimensional space. More...
|
| |
| Result | transform (const Matrix &m) noexcept |
| | Sets the matrix of the affine transformation for the object. More...
|
| |
| Matrix | transform () noexcept |
| | Gets the matrix of the affine transformation of the object. More...
|
| |
| Result | opacity (uint8_t o) noexcept |
| | Sets the opacity of the object. More...
|
| |
| Result | composite (std::unique_ptr< Paint > target, CompositeMethod method) noexcept |
| | Sets the composition target object and the composition method. More...
|
| |
| TVG_DEPRECATED Result | bounds (float *x, float *y, float *w, float *h) const noexcept |
| | Gets the bounding box of the paint object before any transformation. More...
|
| |
| Result | bounds (float *x, float *y, float *w, float *h, bool transformed) const noexcept |
| | Gets the axis-aligned bounding box of the paint object. More...
|
| |
| Paint * | duplicate () const noexcept |
| | Duplicates the object. More...
|
| |
| uint8_t | opacity () const noexcept |
| | Gets the opacity value of the object. More...
|
| |
| CompositeMethod | composite (const Paint **target) const noexcept |
| | Gets the composition target object and the composition method. More...
|
| |
| uint32_t | identifier () const |
| | Return the unique id value of the paint instance. More...
|
| |
A class representing an image read in one of the supported formats: raw, svg, png, jpg and etc. Besides the methods inherited from the Paint, it provides methods to load & draw images on the canvas.
- Note
- Supported formats are depended on the available TVG loaders.