GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::graphics::SpriteOptions Struct Reference

Configuration options for a sprite in a SpriteAtlas. More...

#include <GREM/graphics/SpriteAtlas.hpp>

Public Types

enum  FlipAxis : Flip { NO_FLIP = 0 , FLIP_HORIZONTALLY = 1 << 0 , FLIP_VERTICALLY = 1 << 1 }
 Flag values for Flip that describe how a sprite is flipped when rendered. More...
using Flip = uint8_t
 Flags that describe how a sprite is flipped when rendered.

Public Member Functions

bool operator== (const SpriteOptions &other) const =default
 Compare this set of options to another set for equality.

Public Attributes

Flip flip = NO_FLIP
 Flags that describe how the sprite should be flipped when rendered.
bool convertToPremultipliedAlpha = true
 Convert the inserted sprite image from straight to pre-multiplied alpha.

Detailed Description

Configuration options for a sprite in a SpriteAtlas.

Member Typedef Documentation

◆ Flip

Flags that describe how a sprite is flipped when rendered.

Member Enumeration Documentation

◆ FlipAxis

Flag values for Flip that describe how a sprite is flipped when rendered.

Enumerator
NO_FLIP 

Do not flip the sprite.

FLIP_HORIZONTALLY 

Flip the sprite along the X axis.

FLIP_VERTICALLY 

Flip the sprite along the Y axis.

Member Function Documentation

◆ operator==()

bool grem::graphics::SpriteOptions::operator== ( const SpriteOptions & other) const
nodiscarddefault

Compare this set of options to another set for equality.

Parameters
otherthe options to compare these to.
Returns
true if the options are equal, false otherwise.

Member Data Documentation

◆ flip

Flip grem::graphics::SpriteOptions::flip = NO_FLIP

Flags that describe how the sprite should be flipped when rendered.

◆ convertToPremultipliedAlpha

bool grem::graphics::SpriteOptions::convertToPremultipliedAlpha = true

Convert the inserted sprite image from straight to pre-multiplied alpha.

Note
Only applies to images in raw RGBA formats.

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