AutoBitmap Class Reference

#include <c4d_basebitmap.h>

Detailed Description

A simple BaseBitmap wrapper created from a filename or resource ID.

Private Attributes

BaseBitmapbmp
 

Allocations

 AutoBitmap (const maxon::String &str, Float pixelRatio=1.0)
 
 AutoBitmap (Int32 id)
 
 ~AutoBitmap ()
 

Operators

 operator BaseBitmap * () const
 

Constructor & Destructor Documentation

◆ AutoBitmap() [1/2]

AutoBitmap ( const maxon::String str,
Float  pixelRatio = 1.0 
)
explicit

Allocates a bitmap by filename string and optional pixel ratio.

Parameters
[in]strThe bitmap filename string. Must be inside the res folder of a plugin data.
[in]pixelRatioAn optional pixel ratio.

◆ AutoBitmap() [2/2]

AutoBitmap ( Int32  id)
explicit

Allocates a bitmap by icon ID registered with RegisterIcon().

Parameters
[in]idA registered icon ID.

◆ ~AutoBitmap()

~AutoBitmap ( )

Destructs the allocated AutoBitmap.

Member Function Documentation

◆ operator BaseBitmap *()

operator BaseBitmap * ( ) const

Gets the internal BaseBitmap pointer.

Returns
The internal BaseBitmap pointer, or nullptr if no bitmap has been allocated.

Member Data Documentation

◆ bmp

BaseBitmap* bmp
private