iPlug2 - C++ Audio Plug-in Framework
Loading...
Searching...
No Matches
Public Member Functions | List of all members
APIBitmap Class Reference

A base class interface for a bitmap abstraction around the different drawing back end bitmap representations. More...

#include <IGraphicsPrivate.h>

Inheritance diagram for APIBitmap:
[legend]

Public Member Functions

 APIBitmap (BitmapData pBitmap, int w, int h, float scale, float drawScale)
 APIBitmap constructor. More...
 
 APIBitmap (const APIBitmap &)=delete
 
APIBitmapoperator= (const APIBitmap &)=delete
 
void SetBitmap (BitmapData pBitmap, int w, int h, float scale, float drawScale)
 Used to initialise the members after construction. More...
 
BitmapData GetBitmap () const
 
int GetWidth () const
 
int GetHeight () const
 
float GetScale () const
 
float GetDrawScale () const
 

Detailed Description

A base class interface for a bitmap abstraction around the different drawing back end bitmap representations.

In most cases it does own the bitmap data, the exception being with NanoVG, where the image is loaded onto the GPU as a texture, but still needs to be freed. Most of the time end-users will deal with IBitmap rather than APIBitmap, which is used behind the scenes.

Definition at line 91 of file IGraphicsPrivate.h.

Constructor & Destructor Documentation

◆ APIBitmap() [1/2]

APIBitmap::APIBitmap ( BitmapData  pBitmap,
int  w,
int  h,
float  scale,
float  drawScale 
)
inline

APIBitmap constructor.

Parameters
pBitmappointer or integer index (NanoVG) to the image data
wThe width of the bitmap
hThe height of the bitmap
scaleAn integer representing the scale of this bitmap in relation to a 1:1 pixel screen, e.g. 2 for an @2x bitmap
drawScaleThe draw scale at which this API bitmap was created (used in the context of layers)

Definition at line 101 of file IGraphicsPrivate.h.

◆ APIBitmap() [2/2]

APIBitmap::APIBitmap ( )
inline

Definition at line 109 of file IGraphicsPrivate.h.

◆ ~APIBitmap()

virtual APIBitmap::~APIBitmap ( )
inlinevirtual

Definition at line 117 of file IGraphicsPrivate.h.

Member Function Documentation

◆ GetBitmap()

BitmapData APIBitmap::GetBitmap ( ) const
inline

◆ GetDrawScale()

float APIBitmap::GetDrawScale ( ) const
inline

◆ GetHeight()

int APIBitmap::GetHeight ( ) const
inline

◆ GetScale()

float APIBitmap::GetScale ( ) const
inline

◆ GetWidth()

int APIBitmap::GetWidth ( ) const
inline

◆ SetBitmap()

void APIBitmap::SetBitmap ( BitmapData  pBitmap,
int  w,
int  h,
float  scale,
float  drawScale 
)
inline

Used to initialise the members after construction.

Parameters
pBitmappointer or integer index (NanoVG) to the image data
wThe width of the bitmap
hThe height of the bitmap
scaleThe scale of this bitmap in relation to a 1:1 pixel screen, e.g. 2 for an @2x bitmap
drawScaleThe draw scale at which this API bitmap was created (used in the context of layers)

Definition at line 128 of file IGraphicsPrivate.h.


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