openMSX
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
openmsx::BaseImage Class Referenceabstract

#include <BaseImage.hh>

Inheritance diagram for openmsx::BaseImage:
Inheritance graph
[legend]

Public Member Functions

virtual ~BaseImage ()=default
 
virtual void draw (OutputSurface &output, gl::ivec2 pos, uint8_t r, uint8_t g, uint8_t b, uint8_t alpha)=0
 
gl::ivec2 getSize () const
 
void draw (OutputSurface &output, gl::ivec2 pos, uint8_t alpha=255)
 

Static Public Member Functions

static void checkSize (gl::ivec2 size)
 Performs a sanity check on image size. More...
 

Protected Attributes

gl::ivec2 size
 

Detailed Description

Definition at line 11 of file BaseImage.hh.

Constructor & Destructor Documentation

◆ ~BaseImage()

virtual openmsx::BaseImage::~BaseImage ( )
virtualdefault

Member Function Documentation

◆ checkSize()

void openmsx::BaseImage::checkSize ( gl::ivec2  size)
static

Performs a sanity check on image size.

Throws MSXException if width or height is excessively large. Negative image sizes are valid and flip the image.

Definition at line 8 of file BaseImage.cc.

References size.

Referenced by openmsx::GLImage::GLImage(), and openmsx::SDLImage::SDLImage().

◆ draw() [1/2]

virtual void openmsx::BaseImage::draw ( OutputSurface output,
gl::ivec2  pos,
uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  alpha 
)
pure virtual

◆ draw() [2/2]

void openmsx::BaseImage::draw ( OutputSurface output,
gl::ivec2  pos,
uint8_t  alpha = 255 
)
inline

Definition at line 26 of file BaseImage.hh.

References draw().

◆ getSize()

gl::ivec2 openmsx::BaseImage::getSize ( ) const
inline

Definition at line 24 of file BaseImage.hh.

References size.

Member Data Documentation

◆ size

gl::ivec2 openmsx::BaseImage::size
protected

The documentation for this class was generated from the following files: