Mana
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ImageRect Struct Reference

An image reference along with the margins specifying how to render this image at different sizes. More...

#include <graphics.h>

Public Member Functions

int minWidth () const
 
int minHeight () const
 

Public Attributes

std::unique_ptr< Imageimage
 
int top = 0
 
int left = 0
 
int bottom = 0
 
int right = 0
 
FillMode fillMode = FillMode::Stretch
 

Detailed Description

An image reference along with the margins specifying how to render this image at different sizes.

The margins divide the image into 9 sections as follows:

 !------!--------------!-------!
 !      !      top     !       !
 !------!--------------!-------!
 ! left !              ! right !
 !------!--------------!-------!
 !      !     bottom   !       !
 !------!--------------!-------!

The corner sections will remain as is. The edges and the center sections will be repeated or stretched to fit the target size, depending on the fill mode.

Definition at line 61 of file graphics.h.

Member Function Documentation

◆ minHeight()

int ImageRect::minHeight ( ) const
inline

Definition at line 71 of file graphics.h.

◆ minWidth()

int ImageRect::minWidth ( ) const
inline

Definition at line 70 of file graphics.h.

Member Data Documentation

◆ bottom

int ImageRect::bottom = 0

Definition at line 66 of file graphics.h.

◆ fillMode

FillMode ImageRect::fillMode = FillMode::Stretch

Definition at line 68 of file graphics.h.

◆ image

std::unique_ptr<Image> ImageRect::image

Definition at line 63 of file graphics.h.

◆ left

int ImageRect::left = 0

Definition at line 65 of file graphics.h.

◆ right

int ImageRect::right = 0

Definition at line 67 of file graphics.h.

◆ top

int ImageRect::top = 0

Definition at line 64 of file graphics.h.


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