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

User-facing bitmap abstraction that you use to manage bitmap data, independant of draw class/platform. More...

#include <IGraphicsStructs.h>

Public Member Functions

 IBitmap (APIBitmap *pAPIBitmap, int n, bool framesAreHorizontal, const char *name="")
 IBitmap Constructor. More...
 
int W () const
 
int H () const
 
int FW () const
 
int FH () const
 
int N () const
 
float GetScale () const
 
float GetDrawScale () const
 
APIBitmapGetAPIBitmap () const
 
bool GetFramesAreHorizontal () const
 
const WDL_String & GetResourceName () const
 
bool IsValid () const
 

Detailed Description

User-facing bitmap abstraction that you use to manage bitmap data, independant of draw class/platform.

IBitmap doesn't actually own the image data

See also
APIBitmap An IBitmap's width and height are always in relation to a 1:1 (low dpi) screen. Any scaling happens at the drawing stage.

Definition at line 87 of file IGraphicsStructs.h.

Constructor & Destructor Documentation

◆ IBitmap() [1/2]

IBitmap::IBitmap ( APIBitmap pAPIBitmap,
int  n,
bool  framesAreHorizontal,
const char *  name = "" 
)
inline

IBitmap Constructor.

Parameters
pAPIBitmapPointer to a drawing API bitmap
nNumber of frames (for multi frame film-strip bitmaps)
framesAreHorizontalframesAreHorizontal true if the frames are positioned horizontally
nameResource name for the bitmap

Definition at line 95 of file IGraphicsStructs.h.

◆ IBitmap() [2/2]

IBitmap::IBitmap ( )
inline

Definition at line 105 of file IGraphicsStructs.h.

Member Function Documentation

◆ FH()

int IBitmap::FH ( ) const
inline
Returns
Height of a single frame in pixels

Definition at line 124 of file IGraphicsStructs.h.

Referenced by IRECT::GetCentredInside(), and IRECT::IRECT().

◆ FW()

int IBitmap::FW ( ) const
inline
Returns
Width of a single frame in pixels

Definition at line 121 of file IGraphicsStructs.h.

Referenced by IRECT::GetCentredInside(), and IRECT::IRECT().

◆ GetAPIBitmap()

APIBitmap * IBitmap::GetAPIBitmap ( ) const
inline

◆ GetDrawScale()

float IBitmap::GetDrawScale ( ) const
inline
Returns
the draw scale of the bitmap

Definition at line 133 of file IGraphicsStructs.h.

References APIBitmap::GetDrawScale().

Referenced by IGraphicsCanvas::DrawBitmap(), IGraphicsSkia::DrawBitmap(), IGraphics::DrawRotatedBitmap(), and IGraphics::ScaleBitmap().

◆ GetFramesAreHorizontal()

bool IBitmap::GetFramesAreHorizontal ( ) const
inline
Returns
whether or not frames are stored horizontally

Definition at line 139 of file IGraphicsStructs.h.

Referenced by IGraphics::DrawBitmap(), IGraphics::GetScaledBitmap(), and IGraphics::ScaleBitmap().

◆ GetResourceName()

const WDL_String & IBitmap::GetResourceName ( ) const
inline
Returns
the resource name

Definition at line 142 of file IGraphicsStructs.h.

Referenced by IGraphics::GetScaledBitmap().

◆ GetScale()

float IBitmap::GetScale ( ) const
inline

◆ H()

int IBitmap::H ( ) const
inline

◆ IsValid()

bool IBitmap::IsValid ( ) const
inline
Returns
\true if the bitmap has valid data

Definition at line 145 of file IGraphicsStructs.h.

Referenced by IBSliderControl::Draw(), TestImageControl::Draw(), and IBSliderControl::OnResize().

◆ N()

int IBitmap::N ( ) const
inline

◆ W()

int IBitmap::W ( ) const
inline

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