Rhino C++ API  8.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
CRhinoDib Class Reference

#include <RhinoSdkUiDibMac.h>

Classes

class  CFastPixelAccess
 
class  Pixel
 

Public Types

enum  bitmap_file_type {
  bmp_file_type = 0, jpg_file_type, pcx_file_type, png_file_type,
  tga_file_type, tif_file_type, dds_file_type, unsupported_file_type = 0xFFFFFFFF,
  bmp_file_type = 0, jpg_file_type, pcx_file_type, png_file_type,
  tga_file_type, tif_file_type, dds_file_type, unsupported_file_type = 0xFFFFFFFF
}
 
enum  bitmap_file_type {
  bmp_file_type = 0, jpg_file_type, pcx_file_type, png_file_type,
  tga_file_type, tif_file_type, dds_file_type, unsupported_file_type = 0xFFFFFFFF,
  bmp_file_type = 0, jpg_file_type, pcx_file_type, png_file_type,
  tga_file_type, tif_file_type, dds_file_type, unsupported_file_type = 0xFFFFFFFF
}
 
enum  ComponentOrders : int {
  ComponentOrders::None = 0, ComponentOrders::L = 1, ComponentOrders::BGR = 2, ComponentOrders::RGB = 3,
  ComponentOrders::BGRA = 4, ComponentOrders::RGBA = 5, ComponentOrders::ABGR = 6, ComponentOrders::ARGB = 7,
  ComponentOrders::RUNTIME_24BIT = 2, ComponentOrders::RUNTIME_32BIT = 4, ComponentOrders::None = 0, ComponentOrders::L = 1,
  ComponentOrders::BGR = 2, ComponentOrders::RGB = 3, ComponentOrders::BGRA = 4, ComponentOrders::RGBA = 5,
  ComponentOrders::ABGR = 6, ComponentOrders::ARGB = 7, ComponentOrders::FLOAT = 8, ComponentOrders::RUNTIME_24BIT = 3,
  ComponentOrders::RUNTIME_32BIT = 5
}
 
enum  ComponentOrders : int {
  ComponentOrders::None = 0, ComponentOrders::L = 1, ComponentOrders::BGR = 2, ComponentOrders::RGB = 3,
  ComponentOrders::BGRA = 4, ComponentOrders::RGBA = 5, ComponentOrders::ABGR = 6, ComponentOrders::ARGB = 7,
  ComponentOrders::RUNTIME_24BIT = 2, ComponentOrders::RUNTIME_32BIT = 4, ComponentOrders::None = 0, ComponentOrders::L = 1,
  ComponentOrders::BGR = 2, ComponentOrders::RGB = 3, ComponentOrders::BGRA = 4, ComponentOrders::RGBA = 5,
  ComponentOrders::ABGR = 6, ComponentOrders::ARGB = 7, ComponentOrders::FLOAT = 8, ComponentOrders::RUNTIME_24BIT = 3,
  ComponentOrders::RUNTIME_32BIT = 5
}
 
enum  Quality : int {
  Quality::kHigh, Quality::kMedium, Quality::kLow, Quality::kHigh,
  Quality::kMedium, Quality::kLow
}
 
enum  Quality : int {
  Quality::kHigh, Quality::kMedium, Quality::kLow, Quality::kHigh,
  Quality::kMedium, Quality::kLow
}
 
enum  ResampleAlgorithm { ResampleAlgorithm::Nearest, ResampleAlgorithm::Bilinear, ResampleAlgorithm::Box }
 

Public Member Functions

 CRhinoDib ()
 Construction. More...
 
 CRhinoDib ()
 Construction. More...
 
 CRhinoDib (CGImageRef)
 
 CRhinoDib (const CRhinoDib &)
 copy constructor, create bitmap that matches another More...
 
 CRhinoDib (const CRhinoDib &)
 copy constructor, create bitmap that matches another More...
 
 CRhinoDib (HBITMAP)
 create Dib from hbitmap More...
 
 CRhinoDib (HBITMAP)
 create Dib from hbitmap More...
 
 CRhinoDib (int width, int height, int color_depth, bool select_into_mem_dc=false, CPalette *=NULL)
 create bitmap with specified width, height and color depth More...
 
 CRhinoDib (long width, long height, int color_depth, bool select_into_mem_dc=false, HPALETTE=nullptr)
 create bitmap with specified width, height and color depth More...
 
 CRhinoDib (LPBITMAPINFO, bool free_lpbmi=true)
 set Dib to specified BITMAPINFO pointer More...
 
virtual ~CRhinoDib ()
 Destruction. More...
 
virtual ~CRhinoDib ()
 Destruction. More...
 
BOOL32 BitBlt (int x, int y, int nWidth, int nHeight, const CRhinoDib *srcDC, int srcLeft, int srcTop, int mode)
 
MAC_DEPRECATED HBITMAP Bitmap () const
 returns this, which is not very useful More...
 
HBITMAP Bitmap () const
 
const BITMAPINFO * BitmapInfo () const
 
bool BlendDibsUsingAlphaChannel (long xDest, long yDest, long cx, long cy, CRhinoDib &src, long xSrc, long ySrc)
 
bool BltToDib (BITMAPINFO &destination, long x_dest, long y_dest, long cx, long cy, long x_src, long y_src)
 
bool BltToDib (CRhinoDib &destination, long x_dest, long y_dest, long cx, long cy, long x_src, long y_src)
 Copy dib bits from Dib to destination. More...
 
CRhinoCacheHandleCache () const
 
CRhinoCacheHandleCache () const
 
void Clear (COLORREF)
 Clears (fills) the entire dib with the passed in color... More...
 
void Clear (COLORREF)
 Clears (fills) the entire dib with the passed in color... More...
 
int ColorDepth () const
 
int ColorDepth () const
 
ComponentOrders ComponentOrder (void) const
 
ComponentOrders ComponentOrder (void) const
 
bool ConvertToGrayScale (bool bSetAlpha=false)
 
bool ConvertToGrayScale (bool bSetAlpha=false)
 
void ConvertToNormalMap (bool bLossyCompressionSource, bool &bPositiveZComponent)
 
void ConvertToNormalMap (bool bLossyCompressionSource, bool &bPositiveZComponent)
 
LPBITMAPINFO CopyDib () const
 Return copy of existing dib, you are responsible for destroying this object. More...
 
bool CopyDib (const BITMAPINFO &bmi)
 Copy bmi to m_bitmapinfo. More...
 
HBITMAP CopyHBitmap ()
 
HBITMAP CopyHBitmap () const
 
BOOL32 CopyToClipboard (HWND hwnd) const
 Clipboard operations. More...
 
bool CopyToClipboard (HWND hwnd=nullptr) const
 Clipboard operations. More...
 
bool CreateDib (int width, int height, int color_depth, bool select_into_mem_dc=false, CPalette *=NULL)
 DIB or HBITMAP creation functions. More...
 
LPBITMAPINFO CreateDib (long width, long height, int color_depth, bool select_into_mem_dc=false, HPALETTE=nullptr)
 DIB or HBITMAP creation functions. More...
 
HBITMAP CreateHBitmap (HPALETTE hpal=nullptr)
 Create HBITMAP and set m_hBitmap. More...
 
bool CreatePalette (LPBITMAPINFO)
 
BOOL32 DCSelectBitmap (bool)
 don't know what this might do More...
 
void DestroyDib ()
 Destroy dib && hbitmap and zero out pointers. More...
 
void DestroyDib ()
 Destroy dib && hbitmap and zero out pointers. More...
 
double DPI () const
 
double DPI () const
 
BOOL32 Draw (CDC *pDC, CRect rect, int xSrc=0, int ySrc=0)
 
BOOL32 Draw (CDC *pDC, int x=0, int y=0, int cx=0, int cy=0, int xSrc=0, int ySrc=0)
 Blit functions functions. More...
 
BOOL32 DrawMasked (CDC *pDC, COLORREF crMask, CRect rect, int xSrc=0, int ySrc=0)
 
BOOL32 DrawMasked (CDC *pDC, COLORREF crMask, int x=0, int y=0, int cx=0, int cy=0, int xSrc=0, int ySrc=0)
 
CFastPixelAccessFastPixelAccess (void)
 
CFastPixelAccessFastPixelAccess (void)
 
const CFastPixelAccessFastPixelAccess (void) const
 
const CFastPixelAccessFastPixelAccess (void) const
 
bool FillSolid (COLORREF)
 
BOOL32 FillSolid (ON_Color color)
 
BOOL32 FillSolidRect (CRect &rect, ON_Color color)
 
BOOL32 FillSolidRect (int x, int y, int nWidth, int nHeight, ON_Color color)
 
LPBYTE FindDIBBits () const
 
LPBYTE FindDIBBits (ComponentOrders) const
 
void FlipVertical ()
 
void FlipVertical (void)
 
bool FloodFill (long x, long y, COLORREF cr, int traget_alpha=-1)
 Goofy edit functions. More...
 
void GaussianBlurWithRadius (double radius)
 
UINT GetDepth () const
 
UINT GetDepth () const
 
bool GetPixel (const LPBYTE dib_bits, int color_depth, long x, long y, COLORREF &cr, int &alpha) const
 Gets the RGB color of a pixel at an x,y location. More...
 
bool GetPixel (const LPBYTE dib_bits, int color_depth, long x, long y, float &r, float &g, float &b) const
 Gets the fractional RGB color components (between 0.0 and 1.0) of a pixel at an x,y location. More...
 
bool GetPixel (const LPBYTE dib_bits, int color_depth, long x, long y, float &r, float &g, float &b, float &alpha) const
 
bool GetPixel (const LPBYTE dib_bits, int color_depth, long x, long y, int &r, int &g, int &b) const
 Gets the RGB color components (between 0 and 255) of a pixel at an x,y location. More...
 
bool GetPixel (const LPBYTE dib_bits, int color_depth, long x, long y, int &r, int &g, int &b, int &alpha) const
 
BOOL32 GetPixel (long x, long y, COLORREF &cr) const
 
bool GetPixel (long x, long y, COLORREF &cr) const
 Gets the RGB color of a pixel at an x,y location. More...
 
BOOL32 GetPixel (long x, long y, COLORREF &cr, int &alpha) const
 
bool GetPixel (long x, long y, COLORREF &cr, int &alpha) const
 
BOOL32 GetPixel (long x, long y, float &r, float &g, float &b) const
 
bool GetPixel (long x, long y, float &r, float &g, float &b) const
 Gets the fractional RGB color components (between 0.0 and 1.0) of a pixel at an x,y location. More...
 
BOOL32 GetPixel (long x, long y, float &r, float &g, float &b, float &alpha) const
 
bool GetPixel (long x, long y, float &r, float &g, float &b, float &alpha) const
 
BOOL32 GetPixel (long x, long y, int &r, int &g, int &b) const
 
bool GetPixel (long x, long y, int &r, int &g, int &b) const
 Gets the RGB color components (between 0 and 255) of a pixel at an x,y location. More...
 
BOOL32 GetPixel (long x, long y, int &r, int &g, int &b, int &alpha) const
 
bool GetPixel (long x, long y, int &r, int &g, int &b, int &alpha) const
 
bool GetPixel (unsigned char *base, int x, unsigned char *r, unsigned char *g, unsigned char *b)
 
bool GetPixel (unsigned char *base, long x, unsigned char *r, unsigned char *g, unsigned char *b) const
 
UINT GetStorageSize () const
 
DWORD GetStorageSize () const
 
UINT GetStorageWidth () const
 
DWORD GetStorageWidth () const
 
UINT GLDataType () const
 e.g. GL_UNSIGNED_BYTE More...
 
UINT GLPixelFormat () const
 OpenGL attributes for this image. More...
 
bool GradientFill (COLORREF topLeft, COLORREF topRight, COLORREF bottomLeft, COLORREF bottomRight)
 
int Height () const
 
long Height () const
 
bool IncreaseColorDepth (int nNewColorDepth)
 
bool IncreaseColorDepth (int nNewColorDepth)
 
bool IsAllocated () const
 Call this to ensure there is memory allocated. Replace calls to check FindDIBBits() for nullptr with this. More...
 
bool IsAllocated () const
 
bool IsNormalMap (bool bLossyCompressionSource, bool &bPositiveZComponent) const
 
bool IsNormalMap (bool bLossyCompressionSource, bool &bPositiveZComponent) const
 
bool IsNormalMap (void) const
 
bool IsNormalMap (void) const
 
const wchar_t * LastSaveName () const
 
const wchar_t * LastSaveName () const
 
void MakeOpaque ()
 convert all partially transparent pixels to fully opaque More...
 
void MakeOpaque (void)
 
long NumColors () const
 
int NumColors () const
 
 operator CDC * ()
 
 operator CDC * () const
 
 operator HBITMAP ()
 
 operator HBITMAP () const
 
CRhinoDiboperator= (const CRhinoDib &src)
 
CRhinoDiboperator= (const CRhinoDib &src)
 
CRhinoDiboperator= (HBITMAP hBitmap)
 
CPalette * Palette () const
 
HPALETTE Palette () const
 
long PaletteSize () const
 
long PaletteSize () const
 
bool PasteFromClipboard (HWND hwnd, bool bMustBeSameSize=true, bool bMustHaveSameColorDepth=true) const
 
UINT PelsPerMeter () const
 
UINT PelsPerMeter () const
 
bool Print (HWND hWnd=0, bool bFitToPage=true)
 
ON_DEPRECATED bool Print (HWND hWnd=nullptr, bool bFitToPage=true)
 
class CRhDibPrivate & Private (void)
 
const class CRhDibPrivate & Private (void) const
 
bool ProcessPixels (bool(*f)(const Pixel &, void *pvData), void *pvData=nullptr) const
 
bool ProcessPixels (bool(*f)(const Pixel &, void *pvData), void *pvData=nullptr) const
 
bool ProcessPixels (bool(*f)(Pixel &, void *pvData), void *pvData=nullptr)
 
bool ProcessPixels (bool(*f)(Pixel &, void *pvData), void *pvData=nullptr)
 
void ProcessPixels (void(*f)(const Pixel &, void *pvData), void *pvData=nullptr) const
 
void ProcessPixels (void(*f)(const Pixel &, void *pvData), void *pvData=nullptr) const
 
void ProcessPixels (void(*f)(Pixel &, const void *pvData), const void *pvData=nullptr)
 
void ProcessPixels (void(*f)(Pixel &, const void *pvData), const void *pvData=nullptr)
 
void ProcessPixels (void(*f)(Pixel &, void *pvData), void *pvData=nullptr)
 
void ProcessPixels (void(*f)(Pixel &, void *pvData), void *pvData=nullptr)
 
void ProcessPixels_SingleThreaded (void(*f)(const Pixel &, void *pvData), void *pvData=nullptr) const
 
void ProcessPixels_SingleThreaded (void(*f)(const Pixel &, void *pvData), void *pvData=nullptr) const
 
void ProcessPixels_SingleThreaded (void(*f)(Pixel &, const void *pvData), const void *pvData=nullptr)
 
void ProcessPixels_SingleThreaded (void(*f)(Pixel &, const void *pvData), const void *pvData=nullptr)
 
void ProcessPixels_SingleThreaded (void(*f)(Pixel &, void *pvData), void *pvData=nullptr)
 
void ProcessPixels_SingleThreaded (void(*f)(Pixel &, void *pvData), void *pvData=nullptr)
 
CRhinoCommand::result ReadFile (HWND hWnd=nullptr, bool bUseDialogs=true)
 
CRhinoCommand::result ReadFile (unsigned int doc_serial_number, HWND hWnd=nullptr, bool bUseDialogs=true)
 
bool ReadFromFile (const wchar_t *lpsFileName)
 
bool ReadFromFile (const wchar_t *lpsFileName)
 
bool ReadFromFile (HWND hWnd=0, bool bUseDialogs=true)
 
bool ReadFromFile (HWND hWnd=nullptr, bool bUseDialogs=true)
 
bool ReadFromFile (unsigned int doc_serial_number, const wchar_t *lpsFileName)
 
bool ReadFromFile (unsigned int doc_serial_number, const wchar_t *lpsFileName)
 
bool ReadFromFile (unsigned int doc_serial_number, HWND hWnd=nullptr, bool bUseDialogs=true)
 
bool ReadFromMemory (const void *buffer, int sizeof_buffer)
 
bool ReadFromMemory (const void *buffer, size_t sizeof_buffer)
 
bool Resize (const ON_2iSize &newSize)
 Legacy resize method; uses Bilinear resampling. More...
 
bool Resize (const ON_2iSize &newSize, ResampleAlgorithm alg)
 New resize method; uses chosen resampling algorithm. More...
 
void Resize (int newWidth, int newHeight)
 
bool Resized (const CRhinoDib &input, const ON_2iSize &newSize)
 Legacy resized method; uses Bilinear resampling. More...
 
bool Resized (const CRhinoDib &input, const ON_2iSize &newSize, ResampleAlgorithm alg)
 New resized method; uses chosen resampling algorithm. More...
 
bool ReuseDib (int width, int height, int depth, bool select_into_mem_dc)
 
bool ReuseDib (long width, long height, int color_depth, bool select_into_mem_dc)
 
unsigned int RuntimeSerialNumber () const
 
unsigned int RuntimeSerialNumber () const
 
long ScanWidth () const
 
DWORD ScanWidth () const
 
void SetBitmap (CGImageRef)
 
bool SetBitmap (HBITMAP hBitmap)
 
void SetBitmap (HBITMAP)
 
BOOL32 SetDib (LPBITMAPINFO lpbmi, bool free_lpbmi=true)
 
bool SetDib (LPBITMAPINFO lpbmi, bool free_lpbmi=true)
 
void SetDPI (double)
 
void SetDPI (double)
 
void SetLastSaveName (const wchar_t *)
 
void SetLastSaveName (const wchar_t *)
 
void SetPelsPerMeter (UINT)
 
void SetPelsPerMeter (UINT)
 
BOOL32 SetPixel (long x, long y, COLORREF cr, int alpha=-1)
 
bool SetPixel (long x, long y, COLORREF cr, int alpha=-1)
 Sets the color of a pixel at an x,y location given an RGB color. More...
 
BOOL32 SetPixel (long x, long y, float r, float g, float b, float alpha=-1.0)
 Functions call FindDIBBits and validate x and y. More...
 
bool SetPixel (long x, long y, float r, float g, float b, float alpha=-1.0)
 Sets the color of a pixel at an x,y location given a fractional RGB color components (between 0.0 and 1.0) More...
 
BOOL32 SetPixel (long x, long y, int r, int g, int b, int alpha=-1)
 
bool SetPixel (long x, long y, int r, int g, int b, int alpha=-1)
 Sets the color of a pixel at an x,y location given an RGB color components (between 0 and 255) More...
 
bool SetPixel (LPBYTE dib_bits, int color_depth, long x, long y, COLORREF cr, int alpha=-1)
 Sets the color of a pixel at an x,y location given an RGB color. More...
 
bool SetPixel (LPBYTE dib_bits, int color_depth, long x, long y, float r, float g, float b, float alpha=-1.0)
 Sets the color of a pixel at an x,y location given a fractional RGB color components (between 0.0 and 1.0) More...
 
bool SetPixel (LPBYTE dib_bits, int color_depth, long x, long y, int r, int g, int b, int alpha=-1)
 Sets the color of a pixel at an x,y location given an RGB color components (between 0 and 255) More...
 
CRhinoDibShiftDown ()
 
CRhinoDibShiftLeft ()
 
CRhinoDibShiftRight ()
 
CRhinoDibShiftUp ()
 
long Size () const
 Bitmap information. More...
 
DWORD Size () const
 Bitmap information. More...
 
long SizeBits () const
 
DWORD SizeBits () const
 
long SizeHeader () const
 
long SizeHeader () const
 
BOOL32 StretchBlt (int x, int y, int nWidth, int nHeight, const CRhinoDib *srcDC, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, int mode)
 
void SwapRedAndBlueSamples ()
 exchange the red and blue color bytes in the NSBitmapImageRep More...
 
ON_WindowsBitmap ToON_WindowsBitmap (void) const
 
ON_WindowsBitmapToOnWindowsBitmap () const
 
int Width () const
 
long Width () const
 
long WidthInBytes () const
 
DWORD WidthInBytes () const
 
long WindowYtoDibY (long y) const
 Convert Y value from window display Y to bitmap Y. More...
 
CRhinoCommand::result WriteFile (HWND hWnd=nullptr, bool bUseDialogs=true, Quality q=Quality::kHigh) const
 
bool WriteToFile (const wchar_t *lpsFileName, Quality q=Quality::kHigh) const
 
bool WriteToFile (const wchar_t *lpsFileName, Quality q=Quality::kHigh) const
 
bool WriteToFile (HWND hWnd=0, bool bUseDialogs=true, Quality q=Quality::kHigh) const
 
bool WriteToFile (HWND hWnd=nullptr, bool bUseDialogs=true, Quality q=Quality::kHigh) const
 

Static Public Member Functions

static bitmap_file_type FileTypeFromFileName (const wchar_t *lpsFileName)
 
static bitmap_file_type FileTypeFromFileName (const wchar_t *lpsFileName)
 
static bool FileTypeSupportsAlphaChannel (bitmap_file_type fileType)
 
static bool FileTypeSupportsAlphaChannel (bitmap_file_type fileType)
 
static bool FileTypeSupportsAlphaChannel (const wchar_t *fileName)
 
static bool FileTypeSupportsAlphaChannel (const wchar_t *fileName)
 
static ComponentOrders GLFormatToComponentOrder (GLenum)
 
static ComponentOrders GLFormatToComponentOrder (unsigned int)
 
static bool ReadFromFileImageSize (const wchar_t *lpsFileName, unsigned int *image_width_pixels, unsigned int *image_height_pixels, unsigned int *image_width_dpi, unsigned int *image_height_dpi)
 
static bool ReadFromFileImageSize (const wchar_t *lpsFileName, unsigned int *image_width_pixels, unsigned int *image_height_pixels, unsigned int *image_width_dpi, unsigned int *image_height_dpi)
 

Protected Member Functions

void construct ()
 
void MakeNSImage ()
 
virtual void NonConstOperation ()
 

Static Protected Member Functions

static int GetBitmapType (const wchar_t *lpsFileName)
 
static int GetBitmapType (const wchar_t *lpsFileName)
 

Protected Attributes

unsigned int m_color_depth
 
CDC m_dc
 
class CRhDibPrivate * m_dib_section = nullptr
 
double m_dpi
 
int m_height
 
bool m_is_gray_scale
 
int m_width
 
ON_wString m_wLastSaveName
 

Friends

unsigned int CreateGlAlphaTexture (const CRhinoDib &, bool, unsigned int)
 
class CRhCmnDisplayBitmap
 
class CRhEngine_GL11
 
class CRhEngine_PEP_GL33
 friend void Combine(const CRhinoDib&, CRhinoDib&, const float*, float*); More...
 
class CRhinoDisplayEngine_GDI
 
class CRhinoDisplayEngine_OGL
 
class CRhinoDisplayPipeline
 
class CRhOpenGLRenderer
 
class CRhOpenGLTexture2D
 
class CRhOpenGLTextureCube
 
class CRhRdkPostEffectImage
 This is a list of the badly behaved. More...
 
class CRhRegionSelectHelper
 
class CRhResourceManagerMetal
 
class CXXXXRender
 
GLuint GetGlTextureForDib (class CRhinoDisplayEngine_OGL &, const CRhinoDib &)
 
bool RhinoUpdateCachedTextureFromDib (unsigned int, const CRhinoDib &)
 
class TestDavidEBitmapFlip
 

Detailed Description

Class to manage DIB's. This class will create a DIB, a HBITMAP and associated memory DC. The HBITMAP and CRhinoDib::FindBits() point to the same memory. You can modify the bits directly or use GDI with the associated memory DC to modify the bitmap. The HBITMAP does not get selected by the memory devidce context due to the fact that the DIB can only be selected in one device context at a time. To select or remove the Bitmap() from its memory DC call DCSelectBitmap( bool). If you call DCSelectBitmap( true) you may cast a CRhinoDib as a CDC* or HDC and use it directly.

Member Enumeration Documentation

◆ bitmap_file_type [1/2]

Enumerator
bmp_file_type 

"*.bmp"

jpg_file_type 

"*.jpg;*.jpeg"

pcx_file_type 

"*.pcx"

png_file_type 

"*.png"

tga_file_type 

"*.tga"

tif_file_type 

"*.tif;*.tiff"

dds_file_type 

"*.dds"

unsupported_file_type 

Do NOT change this value, this allows adding additional values without breaking the SDK in the future

bmp_file_type 

"*.bmp"

jpg_file_type 

"*.jpg;*.jpeg"

pcx_file_type 

"*.pcx"

png_file_type 

"*.png"

tga_file_type 

"*.tga"

tif_file_type 

"*.tif;*.tiff"

dds_file_type 

"*.dds"

unsupported_file_type 

Do NOT change this value, this allows adding additional values without breaking the SDK in the future

◆ bitmap_file_type [2/2]

Enumerator
bmp_file_type 

"*.bmp"

jpg_file_type 

"*.jpg;*.jpeg"

pcx_file_type 

"*.pcx"

png_file_type 

"*.png"

tga_file_type 

"*.tga"

tif_file_type 

"*.tif;*.tiff"

dds_file_type 

"*.dds"

unsupported_file_type 

Do NOT change this value, this allows adding additional values without breaking the SDK in the future

bmp_file_type 

"*.bmp"

jpg_file_type 

"*.jpg;*.jpeg"

pcx_file_type 

"*.pcx"

png_file_type 

"*.png"

tga_file_type 

"*.tga"

tif_file_type 

"*.tif;*.tiff"

dds_file_type 

"*.dds"

unsupported_file_type 

Do NOT change this value, this allows adding additional values without breaking the SDK in the future

◆ ComponentOrders [1/2]

enum CRhinoDib::ComponentOrders : int
strong
Enumerator
None 
BGR 
RGB 
BGRA 
RGBA 
ABGR 
ARGB 
RUNTIME_24BIT 
RUNTIME_32BIT 
None 
BGR 
RGB 
BGRA 
RGBA 
ABGR 
ARGB 
FLOAT 
RUNTIME_24BIT 
RUNTIME_32BIT 

◆ ComponentOrders [2/2]

enum CRhinoDib::ComponentOrders : int
strong
Enumerator
None 
BGR 
RGB 
BGRA 
RGBA 
ABGR 
ARGB 
RUNTIME_24BIT 
RUNTIME_32BIT 
None 
BGR 
RGB 
BGRA 
RGBA 
ABGR 
ARGB 
FLOAT 
RUNTIME_24BIT 
RUNTIME_32BIT 

◆ Quality [1/2]

enum CRhinoDib::Quality : int
strong

From RhinoSdkDib.h

Enumerator
kHigh 
kMedium 
kLow 
kHigh 
kMedium 
kLow 

◆ Quality [2/2]

enum CRhinoDib::Quality : int
strong
Enumerator
kHigh 
kMedium 
kLow 
kHigh 
kMedium 
kLow 

◆ ResampleAlgorithm

Enumerator
Nearest 

Samples a single pixel in the source. Fastest.

Bilinear 

Bilinear interpolation of 4 neighboring pixels.

Box 

Accurate brute-force resample of source area to pixels. Slowest.

Constructor & Destructor Documentation

◆ CRhinoDib() [1/10]

CRhinoDib::CRhinoDib ( )

Construction.

◆ CRhinoDib() [2/10]

CRhinoDib::CRhinoDib ( long  width,
long  height,
int  color_depth,
bool  select_into_mem_dc = false,
HPALETTE  = nullptr 
)

create bitmap with specified width, height and color depth

◆ CRhinoDib() [3/10]

CRhinoDib::CRhinoDib ( const CRhinoDib )

copy constructor, create bitmap that matches another

◆ CRhinoDib() [4/10]

CRhinoDib::CRhinoDib ( LPBITMAPINFO  ,
bool  free_lpbmi = true 
)

set Dib to specified BITMAPINFO pointer

◆ CRhinoDib() [5/10]

CRhinoDib::CRhinoDib ( HBITMAP  )

create Dib from hbitmap

◆ ~CRhinoDib() [1/2]

virtual CRhinoDib::~CRhinoDib ( )
virtual

Destruction.

◆ CRhinoDib() [6/10]

CRhinoDib::CRhinoDib ( )

Construction.

◆ CRhinoDib() [7/10]

CRhinoDib::CRhinoDib ( int  width,
int  height,
int  color_depth,
bool  select_into_mem_dc = false,
CPalette *  = NULL 
)

create bitmap with specified width, height and color depth

◆ CRhinoDib() [8/10]

CRhinoDib::CRhinoDib ( const CRhinoDib )

copy constructor, create bitmap that matches another

◆ CRhinoDib() [9/10]

CRhinoDib::CRhinoDib ( HBITMAP  )

create Dib from hbitmap

◆ CRhinoDib() [10/10]

CRhinoDib::CRhinoDib ( CGImageRef  )

◆ ~CRhinoDib() [2/2]

virtual CRhinoDib::~CRhinoDib ( )
virtual

Destruction.

Member Function Documentation

◆ BitBlt()

BOOL32 CRhinoDib::BitBlt ( int  x,
int  y,
int  nWidth,
int  nHeight,
const CRhinoDib srcDC,
int  srcLeft,
int  srcTop,
int  mode 
)

◆ Bitmap() [1/2]

MAC_DEPRECATED HBITMAP CRhinoDib::Bitmap ( ) const

returns this, which is not very useful

◆ Bitmap() [2/2]

HBITMAP CRhinoDib::Bitmap ( ) const

◆ BitmapInfo()

const BITMAPINFO* CRhinoDib::BitmapInfo ( ) const

Description: Get Windows bitmap info. Remarks: NOTE WELL: The bitmap bits are generally NOT located after BITMAPINFO and bmiColors[] array. Returns: A pointer to the bitmap info. Look but do not change. See Also: CRhinoDib::CRhinoDib::FindDIBBits

◆ BlendDibsUsingAlphaChannel()

bool CRhinoDib::BlendDibsUsingAlphaChannel ( long  xDest,
long  yDest,
long  cx,
long  cy,
CRhinoDib src,
long  xSrc,
long  ySrc 
)

◆ BltToDib() [1/2]

bool CRhinoDib::BltToDib ( BITMAPINFO &  destination,
long  x_dest,
long  y_dest,
long  cx,
long  cy,
long  x_src,
long  y_src 
)

◆ BltToDib() [2/2]

bool CRhinoDib::BltToDib ( CRhinoDib destination,
long  x_dest,
long  y_dest,
long  cx,
long  cy,
long  x_src,
long  y_src 
)

Copy dib bits from Dib to destination.

◆ Cache() [1/2]

CRhinoCacheHandle* CRhinoDib::Cache ( ) const

◆ Cache() [2/2]

CRhinoCacheHandle* CRhinoDib::Cache ( ) const

◆ Clear() [1/2]

void CRhinoDib::Clear ( COLORREF  )

Clears (fills) the entire dib with the passed in color...

◆ Clear() [2/2]

void CRhinoDib::Clear ( COLORREF  )

Clears (fills) the entire dib with the passed in color...

◆ ColorDepth() [1/2]

int CRhinoDib::ColorDepth ( ) const

◆ ColorDepth() [2/2]

int CRhinoDib::ColorDepth ( ) const

◆ ComponentOrder() [1/2]

ComponentOrders CRhinoDib::ComponentOrder ( void  ) const

◆ ComponentOrder() [2/2]

ComponentOrders CRhinoDib::ComponentOrder ( void  ) const

◆ construct()

void CRhinoDib::construct ( )
protected

◆ ConvertToGrayScale() [1/2]

bool CRhinoDib::ConvertToGrayScale ( bool  bSetAlpha = false)

Converts the dib into a grayscale image...and promotes it to a 24 bit dib if need be... If bSetAlpha is true, and the bitmap is a 32-bit image, the alpha byte is set to the same as the other three components otherwise, the alpha byte is preserved from the original image.

◆ ConvertToGrayScale() [2/2]

bool CRhinoDib::ConvertToGrayScale ( bool  bSetAlpha = false)

Converts the dib into a grayscale image...and promotes it to a 24 bit dib if need be... If bSetAlpha is true, and the bitmap is a 32-bit image, the alpha byte is set to the same as the other three components otherwise, the alpha byte is preserved from the original image.

◆ ConvertToNormalMap() [1/2]

void CRhinoDib::ConvertToNormalMap ( bool  bLossyCompressionSource,
bool &  bPositiveZComponent 
)

◆ ConvertToNormalMap() [2/2]

void CRhinoDib::ConvertToNormalMap ( bool  bLossyCompressionSource,
bool &  bPositiveZComponent 
)

◆ CopyDib() [1/2]

LPBITMAPINFO CRhinoDib::CopyDib ( ) const

Return copy of existing dib, you are responsible for destroying this object.

◆ CopyDib() [2/2]

bool CRhinoDib::CopyDib ( const BITMAPINFO &  bmi)

Copy bmi to m_bitmapinfo.

◆ CopyHBitmap() [1/2]

HBITMAP CRhinoDib::CopyHBitmap ( )

Return copy of the current Dib(). If Bitmap() is NULL then one is created from Dib() and returned. m_hBitmap is not set if Bitmap was NULL. You are responsible for destroying this object.

◆ CopyHBitmap() [2/2]

HBITMAP CRhinoDib::CopyHBitmap ( ) const

Return copy of the current Dib(). If Bitmap() is NULL then one is created from Dib() and returned. m_hBitmap is not set if Bitmap was NULL. You are responsible for destroying this object.

◆ CopyToClipboard() [1/2]

BOOL32 CRhinoDib::CopyToClipboard ( HWND  hwnd) const

Clipboard operations.

◆ CopyToClipboard() [2/2]

bool CRhinoDib::CopyToClipboard ( HWND  hwnd = nullptr) const

Clipboard operations.

◆ CreateDib() [1/2]

bool CRhinoDib::CreateDib ( int  width,
int  height,
int  color_depth,
bool  select_into_mem_dc = false,
CPalette *  = NULL 
)

DIB or HBITMAP creation functions.

◆ CreateDib() [2/2]

LPBITMAPINFO CRhinoDib::CreateDib ( long  width,
long  height,
int  color_depth,
bool  select_into_mem_dc = false,
HPALETTE  = nullptr 
)

DIB or HBITMAP creation functions.

◆ CreateHBitmap()

HBITMAP CRhinoDib::CreateHBitmap ( HPALETTE  hpal = nullptr)

Create HBITMAP and set m_hBitmap.

◆ CreatePalette()

bool CRhinoDib::CreatePalette ( LPBITMAPINFO  )

◆ DCSelectBitmap()

BOOL32 CRhinoDib::DCSelectBitmap ( bool  )

don't know what this might do

◆ DestroyDib() [1/2]

void CRhinoDib::DestroyDib ( )

Destroy dib && hbitmap and zero out pointers.

◆ DestroyDib() [2/2]

void CRhinoDib::DestroyDib ( )

Destroy dib && hbitmap and zero out pointers.

◆ DPI() [1/2]

double CRhinoDib::DPI ( ) const

◆ DPI() [2/2]

double CRhinoDib::DPI ( ) const

◆ Draw() [1/2]

BOOL32 CRhinoDib::Draw ( CDC *  pDC,
CRect  rect,
int  xSrc = 0,
int  ySrc = 0 
)

◆ Draw() [2/2]

BOOL32 CRhinoDib::Draw ( CDC *  pDC,
int  x = 0,
int  y = 0,
int  cx = 0,
int  cy = 0,
int  xSrc = 0,
int  ySrc = 0 
)

Blit functions functions.

◆ DrawMasked() [1/2]

BOOL32 CRhinoDib::DrawMasked ( CDC *  pDC,
COLORREF  crMask,
CRect  rect,
int  xSrc = 0,
int  ySrc = 0 
)

◆ DrawMasked() [2/2]

BOOL32 CRhinoDib::DrawMasked ( CDC *  pDC,
COLORREF  crMask,
int  x = 0,
int  y = 0,
int  cx = 0,
int  cy = 0,
int  xSrc = 0,
int  ySrc = 0 
)

◆ FastPixelAccess() [1/4]

CFastPixelAccess* CRhinoDib::FastPixelAccess ( void  )

◆ FastPixelAccess() [2/4]

CFastPixelAccess* CRhinoDib::FastPixelAccess ( void  )

◆ FastPixelAccess() [3/4]

const CFastPixelAccess* CRhinoDib::FastPixelAccess ( void  ) const

◆ FastPixelAccess() [4/4]

const CFastPixelAccess* CRhinoDib::FastPixelAccess ( void  ) const

◆ FileTypeFromFileName() [1/2]

static bitmap_file_type CRhinoDib::FileTypeFromFileName ( const wchar_t *  lpsFileName)
static

Description: Call this method to get supported file type from file name. Parameters: lpsFileName - [in] File name, extension will be extracted from the end of this string and compared to supported bitmap file types. Returns: Returns a valid bitmap_file_type on success or unsupported_file_type if the file type is not supported.

◆ FileTypeFromFileName() [2/2]

static bitmap_file_type CRhinoDib::FileTypeFromFileName ( const wchar_t *  lpsFileName)
static

Description: Call this method to get supported file type from file name. Parameters: lpsFileName - [in] File name, extension will be extracted from the end of this string and compared to supported bitmap file types. Returns: Returns a valid bitmap_file_type on success or unsupported_file_type if the file type is not supported.

◆ FileTypeSupportsAlphaChannel() [1/4]

static bool CRhinoDib::FileTypeSupportsAlphaChannel ( bitmap_file_type  fileType)
static

Description: Call this method to see if a specified file type supports 32 bit bitmaps with alpha channel. Parameters: fileType - [in] Bitmap file type to check Returns: Returns a true if the bitmap can be saved as a 32 bit DIB with alpha channel.

◆ FileTypeSupportsAlphaChannel() [2/4]

static bool CRhinoDib::FileTypeSupportsAlphaChannel ( bitmap_file_type  fileType)
static

Description: Call this method to see if a specified file type supports 32 bit bitmaps with alpha channel. Parameters: fileType - [in] Bitmap file type to check Returns: Returns a true if the bitmap can be saved as a 32 bit DIB with alpha channel.

◆ FileTypeSupportsAlphaChannel() [3/4]

static bool CRhinoDib::FileTypeSupportsAlphaChannel ( const wchar_t *  fileName)
static

Description: Call this method to see if a specified file (gets the type from the file extension) supports 32 bit bitmaps with alpha channel. Parameters: fileName - [in] Name of the file to extract the extension from. Returns: Returns a true if the bitmap can be saved as a 32 bit DIB with alpha channel.

◆ FileTypeSupportsAlphaChannel() [4/4]

static bool CRhinoDib::FileTypeSupportsAlphaChannel ( const wchar_t *  fileName)
static

Description: Call this method to see if a specified file (gets the type from the file extension) supports 32 bit bitmaps with alpha channel. Parameters: fileName - [in] Name of the file to extract the extension from. Returns: Returns a true if the bitmap can be saved as a 32 bit DIB with alpha channel.

◆ FillSolid() [1/2]

bool CRhinoDib::FillSolid ( COLORREF  )

Fills the entire dib with the specified color...Note: if it's a 32 bit dib, then the high-order byte of the passed in color is considered to be an alpha value, and thus will also be included in the fill operation (normal GDI operations will strip this out).

◆ FillSolid() [2/2]

BOOL32 CRhinoDib::FillSolid ( ON_Color  color)

◆ FillSolidRect() [1/2]

BOOL32 CRhinoDib::FillSolidRect ( CRect &  rect,
ON_Color  color 
)

◆ FillSolidRect() [2/2]

BOOL32 CRhinoDib::FillSolidRect ( int  x,
int  y,
int  nWidth,
int  nHeight,
ON_Color  color 
)

From RhinoSdkDib.h Fills the entire dib with the specified color...Note: if it's a 32 bit dib, then the high-order byte of the passed in color is considered to be an alpha value, and thus will also be included in the fill operation (normal GDI operations will strip this out).

◆ FindDIBBits() [1/2]

LPBYTE CRhinoDib::FindDIBBits ( ) const

Description: Get Windows bitmap bits. Returns: A pointer to the bits. Look but do not change. See Also: CRhinoDib::BitmapInfo

◆ FindDIBBits() [2/2]

LPBYTE CRhinoDib::FindDIBBits ( ComponentOrders  ) const

◆ FlipVertical() [1/2]

void CRhinoDib::FlipVertical ( )

◆ FlipVertical() [2/2]

void CRhinoDib::FlipVertical ( void  )

◆ FloodFill()

bool CRhinoDib::FloodFill ( long  x,
long  y,
COLORREF  cr,
int  traget_alpha = -1 
)

Goofy edit functions.

◆ GaussianBlurWithRadius()

void CRhinoDib::GaussianBlurWithRadius ( double  radius)

◆ GetBitmapType() [1/2]

static int CRhinoDib::GetBitmapType ( const wchar_t *  lpsFileName)
staticprotected

◆ GetBitmapType() [2/2]

static int CRhinoDib::GetBitmapType ( const wchar_t *  lpsFileName)
staticprotected

◆ GetDepth() [1/2]

UINT CRhinoDib::GetDepth ( ) const

◆ GetDepth() [2/2]

UINT CRhinoDib::GetDepth ( ) const

◆ GetPixel() [1/19]

bool CRhinoDib::GetPixel ( const LPBYTE  dib_bits,
int  color_depth,
long  x,
long  y,
COLORREF &  cr,
int &  alpha 
) const

Gets the RGB color of a pixel at an x,y location.

◆ GetPixel() [2/19]

bool CRhinoDib::GetPixel ( const LPBYTE  dib_bits,
int  color_depth,
long  x,
long  y,
float &  r,
float &  g,
float &  b 
) const

Gets the fractional RGB color components (between 0.0 and 1.0) of a pixel at an x,y location.

◆ GetPixel() [3/19]

bool CRhinoDib::GetPixel ( const LPBYTE  dib_bits,
int  color_depth,
long  x,
long  y,
float &  r,
float &  g,
float &  b,
float &  alpha 
) const

◆ GetPixel() [4/19]

bool CRhinoDib::GetPixel ( const LPBYTE  dib_bits,
int  color_depth,
long  x,
long  y,
int &  r,
int &  g,
int &  b 
) const

Gets the RGB color components (between 0 and 255) of a pixel at an x,y location.

◆ GetPixel() [5/19]

bool CRhinoDib::GetPixel ( const LPBYTE  dib_bits,
int  color_depth,
long  x,
long  y,
int &  r,
int &  g,
int &  b,
int &  alpha 
) const

◆ GetPixel() [6/19]

BOOL32 CRhinoDib::GetPixel ( long  x,
long  y,
COLORREF &  cr 
) const

◆ GetPixel() [7/19]

bool CRhinoDib::GetPixel ( long  x,
long  y,
COLORREF &  cr 
) const

Gets the RGB color of a pixel at an x,y location.

◆ GetPixel() [8/19]

BOOL32 CRhinoDib::GetPixel ( long  x,
long  y,
COLORREF &  cr,
int &  alpha 
) const

◆ GetPixel() [9/19]

bool CRhinoDib::GetPixel ( long  x,
long  y,
COLORREF &  cr,
int &  alpha 
) const

◆ GetPixel() [10/19]

BOOL32 CRhinoDib::GetPixel ( long  x,
long  y,
float &  r,
float &  g,
float &  b 
) const

◆ GetPixel() [11/19]

bool CRhinoDib::GetPixel ( long  x,
long  y,
float &  r,
float &  g,
float &  b 
) const

Gets the fractional RGB color components (between 0.0 and 1.0) of a pixel at an x,y location.

◆ GetPixel() [12/19]

BOOL32 CRhinoDib::GetPixel ( long  x,
long  y,
float &  r,
float &  g,
float &  b,
float &  alpha 
) const

◆ GetPixel() [13/19]

bool CRhinoDib::GetPixel ( long  x,
long  y,
float &  r,
float &  g,
float &  b,
float &  alpha 
) const

◆ GetPixel() [14/19]

BOOL32 CRhinoDib::GetPixel ( long  x,
long  y,
int &  r,
int &  g,
int &  b 
) const

◆ GetPixel() [15/19]

bool CRhinoDib::GetPixel ( long  x,
long  y,
int &  r,
int &  g,
int &  b 
) const

Gets the RGB color components (between 0 and 255) of a pixel at an x,y location.

◆ GetPixel() [16/19]

BOOL32 CRhinoDib::GetPixel ( long  x,
long  y,
int &  r,
int &  g,
int &  b,
int &  alpha 
) const

◆ GetPixel() [17/19]

bool CRhinoDib::GetPixel ( long  x,
long  y,
int &  r,
int &  g,
int &  b,
int &  alpha 
) const

◆ GetPixel() [18/19]

bool CRhinoDib::GetPixel ( unsigned char *  base,
int  x,
unsigned char *  r,
unsigned char *  g,
unsigned char *  b 
)

◆ GetPixel() [19/19]

bool CRhinoDib::GetPixel ( unsigned char *  base,
long  x,
unsigned char *  r,
unsigned char *  g,
unsigned char *  b 
) const

◆ GetStorageSize() [1/2]

UINT CRhinoDib::GetStorageSize ( ) const
inline

◆ GetStorageSize() [2/2]

DWORD CRhinoDib::GetStorageSize ( ) const

◆ GetStorageWidth() [1/2]

UINT CRhinoDib::GetStorageWidth ( ) const

◆ GetStorageWidth() [2/2]

DWORD CRhinoDib::GetStorageWidth ( ) const

◆ GLDataType()

UINT CRhinoDib::GLDataType ( ) const

e.g. GL_UNSIGNED_BYTE

◆ GLFormatToComponentOrder() [1/2]

static ComponentOrders CRhinoDib::GLFormatToComponentOrder ( GLenum  )
static

◆ GLFormatToComponentOrder() [2/2]

static ComponentOrders CRhinoDib::GLFormatToComponentOrder ( unsigned int  )
static

◆ GLPixelFormat()

UINT CRhinoDib::GLPixelFormat ( ) const

OpenGL attributes for this image.

e.g. GL_RGBA

◆ GradientFill()

bool CRhinoDib::GradientFill ( COLORREF  topLeft,
COLORREF  topRight,
COLORREF  bottomLeft,
COLORREF  bottomRight 
)

◆ Height() [1/2]

int CRhinoDib::Height ( ) const

◆ Height() [2/2]

long CRhinoDib::Height ( ) const

◆ IncreaseColorDepth() [1/2]

bool CRhinoDib::IncreaseColorDepth ( int  nNewColorDepth)

If color depth is less than the requested color depth create a new bitmap of the desired color depth and copy old bits to it

◆ IncreaseColorDepth() [2/2]

bool CRhinoDib::IncreaseColorDepth ( int  nNewColorDepth)

If color depth is less than the requested color depth create a new bitmap of the desired color depth and copy old bits to it Change of behavior in V6 - if the new color depth is 32, the alpha pixels will be filled with 255.

◆ IsAllocated() [1/2]

bool CRhinoDib::IsAllocated ( ) const

Call this to ensure there is memory allocated. Replace calls to check FindDIBBits() for nullptr with this.

◆ IsAllocated() [2/2]

bool CRhinoDib::IsAllocated ( ) const

◆ IsNormalMap() [1/4]

bool CRhinoDib::IsNormalMap ( bool  bLossyCompressionSource,
bool &  bPositiveZComponent 
) const

Description: Call this method to see if the DIB appears to be a normal map. Parameters: bLossyCompressionSource - [in] True if the source of the bitmap is an image with lossy compression (e.g. jpg). False otherwise. The check will be less strict if the image can contain errors due to lossy compression. bPositiveZComponent - [out] True if the image is a normal map with the z-component mapped to the range 0 .. +1. False if the image is a normal map with the z-component mapped to the range -1 .. +1. Returns: Returns true if the bitmap appears to be a normal map. False otherwise.

◆ IsNormalMap() [2/4]

bool CRhinoDib::IsNormalMap ( bool  bLossyCompressionSource,
bool &  bPositiveZComponent 
) const

Description: Call this method to see if the DIB appears to be a normal map. Parameters: bLossyCompressionSource - [in] True if the source of the bitmap is an image with lossy compression (e.g. jpg). False otherwise. The check will be less strict if the image can contain errors due to lossy compression. bPositiveZComponent - [out] True if the image is a normal map with the z-component mapped to the range 0 .. +1. False if the image is a normal map with the z-component mapped to the range -1 .. +1. Returns: Returns true if the bitmap appears to be a normal map. False otherwise.

◆ IsNormalMap() [3/4]

bool CRhinoDib::IsNormalMap ( void  ) const

Description: Call this method to see if the DIB appears to be a normal map. Returns: Returns true if the bitmap appears to be a normal map. False otherwise.

Deprecated:
Use the version that takes parameters bLossyCompressionSource and bPositiveZComponent

◆ IsNormalMap() [4/4]

bool CRhinoDib::IsNormalMap ( void  ) const

Description: Call this method to see if the DIB appears to be a normal map. Returns: Returns true if the bitmap appears to be a normal map. False otherwise.

Deprecated:
Use the version that takes parameters bLossyCompressionSource and bPositiveZComponent

◆ LastSaveName() [1/2]

const wchar_t* CRhinoDib::LastSaveName ( ) const

◆ LastSaveName() [2/2]

const wchar_t* CRhinoDib::LastSaveName ( ) const

◆ MakeNSImage()

void CRhinoDib::MakeNSImage ( )
protected

◆ MakeOpaque() [1/2]

void CRhinoDib::MakeOpaque ( )

convert all partially transparent pixels to fully opaque

◆ MakeOpaque() [2/2]

void CRhinoDib::MakeOpaque ( void  )

◆ NonConstOperation()

virtual void CRhinoDib::NonConstOperation ( )
protectedvirtual

◆ NumColors() [1/2]

long CRhinoDib::NumColors ( ) const

◆ NumColors() [2/2]

int CRhinoDib::NumColors ( ) const

◆ operator CDC *() [1/2]

CRhinoDib::operator CDC * ( )

◆ operator CDC *() [2/2]

CRhinoDib::operator CDC * ( ) const

◆ operator HBITMAP() [1/2]

CRhinoDib::operator HBITMAP ( )

◆ operator HBITMAP() [2/2]

CRhinoDib::operator HBITMAP ( ) const

◆ operator=() [1/3]

CRhinoDib& CRhinoDib::operator= ( const CRhinoDib src)

Copy source bitmap, if m_hBitmap is non NULL then create destroy current and create new hBitmap

◆ operator=() [2/3]

CRhinoDib& CRhinoDib::operator= ( const CRhinoDib src)

Copy source bitmap, if m_hBitmap is non NULL then create destroy current and create new hBitmap

◆ operator=() [3/3]

CRhinoDib& CRhinoDib::operator= ( HBITMAP  hBitmap)

◆ Palette() [1/2]

CPalette* CRhinoDib::Palette ( ) const

◆ Palette() [2/2]

HPALETTE CRhinoDib::Palette ( ) const

◆ PaletteSize() [1/2]

long CRhinoDib::PaletteSize ( ) const

◆ PaletteSize() [2/2]

long CRhinoDib::PaletteSize ( ) const

◆ PasteFromClipboard()

bool CRhinoDib::PasteFromClipboard ( HWND  hwnd,
bool  bMustBeSameSize = true,
bool  bMustHaveSameColorDepth = true 
) const

◆ PelsPerMeter() [1/2]

UINT CRhinoDib::PelsPerMeter ( ) const

◆ PelsPerMeter() [2/2]

UINT CRhinoDib::PelsPerMeter ( ) const

◆ Print() [1/2]

bool CRhinoDib::Print ( HWND  hWnd = 0,
bool  bFitToPage = true 
)

Description: Display print dialog Parameters: hWnd - [in] Parent window for print dialog. If NULL will use Rhino frame window. Returns: true - DIB sent to printer false - Print dialog canceled or error writing to printer.

◆ Print() [2/2]

ON_DEPRECATED bool CRhinoDib::Print ( HWND  hWnd = nullptr,
bool  bFitToPage = true 
)

Description: Display print dialog Parameters: hWnd - [in] Parent window for print dialog. If NULL will use Rhino frame window. Returns: true - DIB sent to printer false - Print dialog canceled or error writing to printer.

◆ Private() [1/2]

class CRhDibPrivate& CRhinoDib::Private ( void  )

◆ Private() [2/2]

const class CRhDibPrivate& CRhinoDib::Private ( void  ) const

◆ ProcessPixels() [1/10]

bool CRhinoDib::ProcessPixels ( bool(*)(const Pixel &, void *pvData)  f,
void *  pvData = nullptr 
) const

◆ ProcessPixels() [2/10]

bool CRhinoDib::ProcessPixels ( bool(*)(const Pixel &, void *pvData)  f,
void *  pvData = nullptr 
) const

◆ ProcessPixels() [3/10]

bool CRhinoDib::ProcessPixels ( bool(*)(Pixel &, void *pvData)  f,
void *  pvData = nullptr 
)

Pixel iterators with an interrupt. Return false in the callback function to interrupt the loops. Current implementation is not multithreaded, but this may change.

◆ ProcessPixels() [4/10]

bool CRhinoDib::ProcessPixels ( bool(*)(Pixel &, void *pvData)  f,
void *  pvData = nullptr 
)

Pixel iterators with an interrupt. Return false in the callback function to interrupt the loops.
Current implementation is not multithreaded, but this may change.

◆ ProcessPixels() [5/10]

void CRhinoDib::ProcessPixels ( void(*)(const Pixel &, void *pvData)  f,
void *  pvData = nullptr 
) const

◆ ProcessPixels() [6/10]

void CRhinoDib::ProcessPixels ( void(*)(const Pixel &, void *pvData)  f,
void *  pvData = nullptr 
) const

◆ ProcessPixels() [7/10]

void CRhinoDib::ProcessPixels ( void(*)(Pixel &, const void *pvData)  f,
const void *  pvData = nullptr 
)

◆ ProcessPixels() [8/10]

void CRhinoDib::ProcessPixels ( void(*)(Pixel &, const void *pvData)  f,
const void *  pvData = nullptr 
)

◆ ProcessPixels() [9/10]

void CRhinoDib::ProcessPixels ( void(*)(Pixel &, void *pvData)  f,
void *  pvData = nullptr 
)

Fast pixel iterators. Quick access to the image data for each pixel, multi-threaded. Use the pixel setter provided to quickly set pixel values.

◆ ProcessPixels() [10/10]

void CRhinoDib::ProcessPixels ( void(*)(Pixel &, void *pvData)  f,
void *  pvData = nullptr 
)

Fast pixel iterators. Quick access to the image data for each pixel, multi-threaded. Use the pixel setter provided to quickly set pixel values.

◆ ProcessPixels_SingleThreaded() [1/6]

void CRhinoDib::ProcessPixels_SingleThreaded ( void(*)(const Pixel &, void *pvData)  f,
void *  pvData = nullptr 
) const

◆ ProcessPixels_SingleThreaded() [2/6]

void CRhinoDib::ProcessPixels_SingleThreaded ( void(*)(const Pixel &, void *pvData)  f,
void *  pvData = nullptr 
) const

◆ ProcessPixels_SingleThreaded() [3/6]

void CRhinoDib::ProcessPixels_SingleThreaded ( void(*)(Pixel &, const void *pvData)  f,
const void *  pvData = nullptr 
)

◆ ProcessPixels_SingleThreaded() [4/6]

void CRhinoDib::ProcessPixels_SingleThreaded ( void(*)(Pixel &, const void *pvData)  f,
const void *  pvData = nullptr 
)

◆ ProcessPixels_SingleThreaded() [5/6]

void CRhinoDib::ProcessPixels_SingleThreaded ( void(*)(Pixel &, void *pvData)  f,
void *  pvData = nullptr 
)

◆ ProcessPixels_SingleThreaded() [6/6]

void CRhinoDib::ProcessPixels_SingleThreaded ( void(*)(Pixel &, void *pvData)  f,
void *  pvData = nullptr 
)

◆ ReadFile() [1/2]

CRhinoCommand::result CRhinoDib::ReadFile ( HWND  hWnd = nullptr,
bool  bUseDialogs = true 
)

Description: Display Rhino bitmap open dialog prompting for name then read bitmap from disk. Parameters: hWnd - [in] Parent window for file dialog. If NULL will use Rhino frame window. bUseDialogs - [in] If true then display file dialog otherwise prompt for name on command line. Returns: CRhinoCommand::result::cancel - The file dialog or script was canceled. CRhinoCommand::result::failure - Error reading the file. CRhinoCommand::result::success - The file was read successfully

Deprecated:
Use the version that takes doc_serial_number

◆ ReadFile() [2/2]

CRhinoCommand::result CRhinoDib::ReadFile ( unsigned int  doc_serial_number,
HWND  hWnd = nullptr,
bool  bUseDialogs = true 
)

Description: Display Rhino bitmap open dialog prompting for name then read bitmap from disk. Parameters: doc_serial_number - [in] CRhinoDoc runtime serial number for searches. hWnd - [in] Parent window for file dialog. If NULL will use Rhino frame window. bUseDialogs - [in] If true then display file dialog otherwise prompt for name on command line. Returns: CRhinoCommand::result::cancel - The file dialog or script was canceled. CRhinoCommand::result::failure - Error reading the file. CRhinoCommand::result::success - The file was read successfully

◆ ReadFromFile() [1/7]

bool CRhinoDib::ReadFromFile ( const wchar_t *  lpsFileName)

Description: Read bitmap from disk. Parameters: lpsFileName - [in] Name of file to read. Uses CRhinoFileUtilities::FindFile(...) to validate file name. Returns: true - File was read from disk. false - Error reading file or invalid file type.

Deprecated:
Use the version that takes doc_serial_number

◆ ReadFromFile() [2/7]

bool CRhinoDib::ReadFromFile ( const wchar_t *  lpsFileName)

Description: Read bitmap from disk. Parameters: lpsFileName - [in] Name of file to read. Uses CRhinoFileUtilities::FindFile(...) to validate file name. Returns: true - File was read from disk. false - Error reading file or invalid file type.

Deprecated:
Use the version that takes doc_serial_number

◆ ReadFromFile() [3/7]

bool CRhinoDib::ReadFromFile ( HWND  hWnd = 0,
bool  bUseDialogs = true 
)

Description: Display Rhino bitmap open dialog prompting for name then read bitmap from disk. Parameters: hWnd - [in] Parent window for file dialog. If NULL will use Rhino frame window. bUseDialogs - [in] If true then display file dialog otherwise prompt for name on command line. Returns: true - File name specified and written to disk. false - File dialog canceled or error writing file.

◆ ReadFromFile() [4/7]

bool CRhinoDib::ReadFromFile ( HWND  hWnd = nullptr,
bool  bUseDialogs = true 
)

Description: Display Rhino bitmap open dialog prompting for name then read bitmap from disk. Parameters: hWnd - [in] Parent window for file dialog. If NULL will use Rhino frame window. bUseDialogs - [in] If true then display file dialog otherwise prompt for name on command line. Returns: true - File name specified and written to disk. false - File dialog canceled or error reading file.

Deprecated:
Use the version that takes doc_serial_number

◆ ReadFromFile() [5/7]

bool CRhinoDib::ReadFromFile ( unsigned int  doc_serial_number,
const wchar_t *  lpsFileName 
)

Description: Read bitmap from disk. Parameters: lpsFileName - [in] Name of file to read. Uses CRhinoFileUtilities::FindFile(...) to validate file name. doc_serial_number - [in] Runtime serial number of the CRhinoDoc to be used for image searches Returns: true - File was read from disk. false - Error reading file or invalid file type.

◆ ReadFromFile() [6/7]

bool CRhinoDib::ReadFromFile ( unsigned int  doc_serial_number,
const wchar_t *  lpsFileName 
)

Description: Read bitmap from disk. Parameters: lpsFileName - [in] Name of file to read. Uses CRhinoFileUtilities::FindFile(...) to validate file name.s doc_serial_number - [in] Runtime serial number of the CRhinoDoc to be used for image searches Returns: true - File was read from disk. false - Error reading file or invalid file type.

◆ ReadFromFile() [7/7]

bool CRhinoDib::ReadFromFile ( unsigned int  doc_serial_number,
HWND  hWnd = nullptr,
bool  bUseDialogs = true 
)

Description: Display Rhino bitmap open dialog prompting for name then read bitmap from disk. Parameters: doc_serial_number - [in] CRhinoDoc::RuntimeSerialNumber to use for searches. hWnd - [in] Parent window for file dialog. If NULL will use Rhino frame window. bUseDialogs - [in] If true then display file dialog otherwise prompt for name on command line. Returns: true - File name specified and written to disk. false - File dialog canceled or error reading file.

◆ ReadFromFileImageSize() [1/2]

static bool CRhinoDib::ReadFromFileImageSize ( const wchar_t *  lpsFileName,
unsigned int *  image_width_pixels,
unsigned int *  image_height_pixels,
unsigned int *  image_width_dpi,
unsigned int *  image_height_dpi 
)
static

Description: Read bitmap image size from disk. Parameters: lpsFileName - [in] Name of file to read. Uses CRhinoFileUtilities::FindFile(...) to validate file name.

image_width_pixels - [out] image_height_pixels - [out] The sizes of the image are returned in the pixels parameters.

image_width_dpi - [out] image_height_dpi - [out] The dots per inch values saved in the image file are returned in the dpi parameters. Returns: true - File was read from disk. false - Error reading file or invalid file type.

◆ ReadFromFileImageSize() [2/2]

static bool CRhinoDib::ReadFromFileImageSize ( const wchar_t *  lpsFileName,
unsigned int *  image_width_pixels,
unsigned int *  image_height_pixels,
unsigned int *  image_width_dpi,
unsigned int *  image_height_dpi 
)
static

Description: Read bitmap image size from disk. Parameters: lpsFileName - [in] Name of file to read. Uses CRhinoFileUtilities::FindFile(...) to validate file name.

image_width_pixels - [out] image_height_pixels - [out] The sizes of the image are returned in the pixels parameters.

image_width_dpi - [out] image_height_dpi - [out] The dots per inch values saved in the image file are returned in the dpi parameters. Returns: true - File was read from disk. false - Error reading file or invalid file type.

◆ ReadFromMemory() [1/2]

bool CRhinoDib::ReadFromMemory ( const void *  buffer,
int  sizeof_buffer 
)

Description: Read bitmap from a memory buffer. Parameters: buffer - [in] sizeof_buffer - [in] number of bytes in the buffer Returns: true - Image was read from buffer false - Error reading buffer

◆ ReadFromMemory() [2/2]

bool CRhinoDib::ReadFromMemory ( const void *  buffer,
size_t  sizeof_buffer 
)

Description: Read bitmap from a memory buffer. Parameters: buffer - [in] sizeof_buffer - [in] number of bytes in the buffer Returns: true - Image was read from buffer false - Error reading buffer

◆ Resize() [1/3]

bool CRhinoDib::Resize ( const ON_2iSize newSize)

Legacy resize method; uses Bilinear resampling.

◆ Resize() [2/3]

bool CRhinoDib::Resize ( const ON_2iSize newSize,
ResampleAlgorithm  alg 
)

New resize method; uses chosen resampling algorithm.

◆ Resize() [3/3]

void CRhinoDib::Resize ( int  newWidth,
int  newHeight 
)

◆ Resized() [1/2]

bool CRhinoDib::Resized ( const CRhinoDib input,
const ON_2iSize newSize 
)

Legacy resized method; uses Bilinear resampling.

◆ Resized() [2/2]

bool CRhinoDib::Resized ( const CRhinoDib input,
const ON_2iSize newSize,
ResampleAlgorithm  alg 
)

New resized method; uses chosen resampling algorithm.

◆ ReuseDib() [1/2]

bool CRhinoDib::ReuseDib ( int  width,
int  height,
int  depth,
bool  select_into_mem_dc 
)

◆ ReuseDib() [2/2]

bool CRhinoDib::ReuseDib ( long  width,
long  height,
int  color_depth,
bool  select_into_mem_dc 
)

◆ RuntimeSerialNumber() [1/2]

unsigned int CRhinoDib::RuntimeSerialNumber ( ) const

◆ RuntimeSerialNumber() [2/2]

unsigned int CRhinoDib::RuntimeSerialNumber ( ) const

◆ ScanWidth() [1/2]

long CRhinoDib::ScanWidth ( ) const

◆ ScanWidth() [2/2]

DWORD CRhinoDib::ScanWidth ( ) const

◆ SetBitmap() [1/3]

void CRhinoDib::SetBitmap ( CGImageRef  )

◆ SetBitmap() [2/3]

bool CRhinoDib::SetBitmap ( HBITMAP  hBitmap)

Create dib from hBitmap, if dib created successfully m_hBitmap is set to a new HBITMAP created from Dib()

◆ SetBitmap() [3/3]

void CRhinoDib::SetBitmap ( HBITMAP  )

◆ SetDib() [1/2]

BOOL32 CRhinoDib::SetDib ( LPBITMAPINFO  lpbmi,
bool  free_lpbmi = true 
)

Destroy existing m_bitmapinfo and m_hBitmap, set them to specified dib. If Bitmap() was non NULL then a new HBITMAP is created from the new dib

◆ SetDib() [2/2]

bool CRhinoDib::SetDib ( LPBITMAPINFO  lpbmi,
bool  free_lpbmi = true 
)

Destroy existing m_bitmapinfo and m_hBitmap, set them to specified dib. If Bitmap() was non NULL then a new HBITMAP is created from the new dib

◆ SetDPI() [1/2]

void CRhinoDib::SetDPI ( double  )

◆ SetDPI() [2/2]

void CRhinoDib::SetDPI ( double  )

◆ SetLastSaveName() [1/2]

void CRhinoDib::SetLastSaveName ( const wchar_t *  )

◆ SetLastSaveName() [2/2]

void CRhinoDib::SetLastSaveName ( const wchar_t *  )

◆ SetPelsPerMeter() [1/2]

void CRhinoDib::SetPelsPerMeter ( UINT  )

◆ SetPelsPerMeter() [2/2]

void CRhinoDib::SetPelsPerMeter ( UINT  )

◆ SetPixel() [1/9]

BOOL32 CRhinoDib::SetPixel ( long  x,
long  y,
COLORREF  cr,
int  alpha = -1 
)

◆ SetPixel() [2/9]

bool CRhinoDib::SetPixel ( long  x,
long  y,
COLORREF  cr,
int  alpha = -1 
)

Sets the color of a pixel at an x,y location given an RGB color.

◆ SetPixel() [3/9]

BOOL32 CRhinoDib::SetPixel ( long  x,
long  y,
float  r,
float  g,
float  b,
float  alpha = -1.0 
)

Functions call FindDIBBits and validate x and y.

◆ SetPixel() [4/9]

bool CRhinoDib::SetPixel ( long  x,
long  y,
float  r,
float  g,
float  b,
float  alpha = -1.0 
)

Sets the color of a pixel at an x,y location given a fractional RGB color components (between 0.0 and 1.0)

These "safe" functions call CRhinoDib::FindDIBBits and validate x and y

◆ SetPixel() [5/9]

BOOL32 CRhinoDib::SetPixel ( long  x,
long  y,
int  r,
int  g,
int  b,
int  alpha = -1 
)

◆ SetPixel() [6/9]

bool CRhinoDib::SetPixel ( long  x,
long  y,
int  r,
int  g,
int  b,
int  alpha = -1 
)

Sets the color of a pixel at an x,y location given an RGB color components (between 0 and 255)

◆ SetPixel() [7/9]

bool CRhinoDib::SetPixel ( LPBYTE  dib_bits,
int  color_depth,
long  x,
long  y,
COLORREF  cr,
int  alpha = -1 
)

Sets the color of a pixel at an x,y location given an RGB color.

◆ SetPixel() [8/9]

bool CRhinoDib::SetPixel ( LPBYTE  dib_bits,
int  color_depth,
long  x,
long  y,
float  r,
float  g,
float  b,
float  alpha = -1.0 
)

Sets the color of a pixel at an x,y location given a fractional RGB color components (between 0.0 and 1.0)

These "unsafe" functions assume the DIB bits are valid and assume x and y are within range

◆ SetPixel() [9/9]

bool CRhinoDib::SetPixel ( LPBYTE  dib_bits,
int  color_depth,
long  x,
long  y,
int  r,
int  g,
int  b,
int  alpha = -1 
)

Sets the color of a pixel at an x,y location given an RGB color components (between 0 and 255)

◆ ShiftDown()

CRhinoDib* CRhinoDib::ShiftDown ( )

shift a dib down by one pixel - wraps other side around only works on a 24 and 32 bit dibs right now. note that since a DIB is flipped in y from what you'd expect, the guts of this does what you'd usually think to do to shift it up by one pixel

◆ ShiftLeft()

CRhinoDib* CRhinoDib::ShiftLeft ( )

shift a dib left by one pixel - wraps other side around only works on a 24 and 32 bit dibs right now.

◆ ShiftRight()

CRhinoDib* CRhinoDib::ShiftRight ( )

shift a dib right by one pixel - wraps other side around only works on a 24 and 32 bit dibs right now.f

◆ ShiftUp()

CRhinoDib* CRhinoDib::ShiftUp ( )

shift a dib up by one pixel - wraps other side around only works on a 24 and 32 bit dibs right now. note that since a DIB is flipped in y from what you'd expect, the guts of this does what you'd usually think to do to shift it down by one pixel

◆ Size() [1/2]

long CRhinoDib::Size ( ) const

Bitmap information.

◆ Size() [2/2]

DWORD CRhinoDib::Size ( ) const

Bitmap information.

◆ SizeBits() [1/2]

long CRhinoDib::SizeBits ( ) const

◆ SizeBits() [2/2]

DWORD CRhinoDib::SizeBits ( ) const

◆ SizeHeader() [1/2]

long CRhinoDib::SizeHeader ( ) const

◆ SizeHeader() [2/2]

long CRhinoDib::SizeHeader ( ) const

◆ StretchBlt()

BOOL32 CRhinoDib::StretchBlt ( int  x,
int  y,
int  nWidth,
int  nHeight,
const CRhinoDib srcDC,
int  xSrc,
int  ySrc,
int  nSrcWidth,
int  nSrcHeight,
int  mode 
)

◆ SwapRedAndBlueSamples()

void CRhinoDib::SwapRedAndBlueSamples ( )

exchange the red and blue color bytes in the NSBitmapImageRep

◆ ToON_WindowsBitmap()

ON_WindowsBitmap CRhinoDib::ToON_WindowsBitmap ( void  ) const

◆ ToOnWindowsBitmap()

ON_WindowsBitmap* CRhinoDib::ToOnWindowsBitmap ( ) const

Description: Call this method to convert this bitmap to a ON_WindowsBitmap pointer, you should NEVER call ON_WindowsBitmap(BitmapInfo()) as it assumes the BITMAPINFO is a contiguous block of memory for the bitmap and its color table. CRhinoDib will rarely represent a contiguous block of memory and will cause the ON_WindowsBitamp constructor to crash when attempting to copy the bitmap bits. Returns: A pointer to a new ON_WindowsBitmap, the caller is responsible for deleting the returned pointer.

◆ Width() [1/2]

int CRhinoDib::Width ( ) const

◆ Width() [2/2]

long CRhinoDib::Width ( ) const

◆ WidthInBytes() [1/2]

long CRhinoDib::WidthInBytes ( ) const

◆ WidthInBytes() [2/2]

DWORD CRhinoDib::WidthInBytes ( ) const

◆ WindowYtoDibY()

long CRhinoDib::WindowYtoDibY ( long  y) const

Convert Y value from window display Y to bitmap Y.

◆ WriteFile()

CRhinoCommand::result CRhinoDib::WriteFile ( HWND  hWnd = nullptr,
bool  bUseDialogs = true,
Quality  q = Quality::kHigh 
) const

Description: Prompt user for the name of the bitmap file to save then write the bitmap file. Parameters: hWnd - [in] Parent window of the file dialog. bUseDialogs - [in] If true then the file dialog is displayed otherwise; the user is prompted on the command line for a file name. q [in] Returns: CRhinoCommand::result::cancel - The file dialog or script was canceled. CRhinoCommand::result::failure - Error writing the bitmap file. CRhinoCommand::result::success - The file was written successfully.

◆ WriteToFile() [1/4]

bool CRhinoDib::WriteToFile ( const wchar_t *  lpsFileName,
Quality  q = Quality::kHigh 
) const

Description: Write bitmap to disk. Parameters: lpsFileName - [in] Name of file to write. Returns: true - Specified File name written to disk. false - Error writing file or invalid file type.

◆ WriteToFile() [2/4]

bool CRhinoDib::WriteToFile ( const wchar_t *  lpsFileName,
Quality  q = Quality::kHigh 
) const

Description: Write bitmap to disk. Parameters: lpsFileName - [in] Name of file to write. Returns: true - Specified File name written to disk. false - Error writing file or invalid file type.

◆ WriteToFile() [3/4]

bool CRhinoDib::WriteToFile ( HWND  hWnd = 0,
bool  bUseDialogs = true,
Quality  q = Quality::kHigh 
) const

◆ WriteToFile() [4/4]

bool CRhinoDib::WriteToFile ( HWND  hWnd = nullptr,
bool  bUseDialogs = true,
Quality  q = Quality::kHigh 
) const

Description: Prompt user for the name of the bitmap file to save then write the bitmap file. Parameters: hWnd - [in] Parent window of the file dialog. bUseDialogs - [in] If true then the file dialog is displayed otherwise; the user is prompted on the command line for a file name. q [in] Returns: Returns true if a file name was supplied and the file was written successfully.

Friends And Related Function Documentation

◆ CreateGlAlphaTexture

unsigned int CreateGlAlphaTexture ( const CRhinoDib ,
bool  ,
unsigned int   
)
friend

◆ CRhCmnDisplayBitmap

friend class CRhCmnDisplayBitmap
friend

◆ CRhEngine_GL11

friend class CRhEngine_GL11
friend

◆ CRhEngine_PEP_GL33

friend class CRhEngine_PEP_GL33
friend

friend void Combine(const CRhinoDib&, CRhinoDib&, const float*, float*);

◆ CRhinoDisplayEngine_GDI

friend class CRhinoDisplayEngine_GDI
friend

◆ CRhinoDisplayEngine_OGL

friend class CRhinoDisplayEngine_OGL
friend

◆ CRhinoDisplayPipeline

friend class CRhinoDisplayPipeline
friend

◆ CRhOpenGLRenderer

friend class CRhOpenGLRenderer
friend

friend class CRhinoZBuffer; friend class CRhinoRenderOverlays;

◆ CRhOpenGLTexture2D

friend class CRhOpenGLTexture2D
friend

◆ CRhOpenGLTextureCube

friend class CRhOpenGLTextureCube
friend

◆ CRhRdkPostEffectImage

friend class CRhRdkPostEffectImage
friend

This is a list of the badly behaved.

◆ CRhRegionSelectHelper

friend class CRhRegionSelectHelper
friend

◆ CRhResourceManagerMetal

friend class CRhResourceManagerMetal
friend

◆ CXXXXRender

friend class CXXXXRender
friend

◆ GetGlTextureForDib

GLuint GetGlTextureForDib ( class CRhinoDisplayEngine_OGL ,
const CRhinoDib  
)
friend

friend CRhinoDib* RhinoCreateAnaglyph(const CRhinoDib&, const CRhinoDib&,const int); friend void ConvertDepthToImage(CRhinoDib&, bool);

◆ RhinoUpdateCachedTextureFromDib

bool RhinoUpdateCachedTextureFromDib ( unsigned int  ,
const CRhinoDib  
)
friend

Description: Updates the given cached texture's contents with the contents of the passed in Dib. Note: If the resolution of the Dib is not the same as the cached texture's, then a new cached texture will be created in its place, re-using the same cached handle. For performance purposes, it is recommended that you try to manage using matching resolutions when updating cached textures.

Parameters: hTexture - handle to a valid cached texture (obtained by calling GetCachedTexture()) Dib - Image contents used to update the cached texture's contents.

Returns: True - if/when the updating of the cached texture succeeds. False - if/when something failed during the update process.

◆ TestDavidEBitmapFlip

friend class TestDavidEBitmapFlip
friend

Member Data Documentation

◆ m_color_depth

unsigned int CRhinoDib::m_color_depth
protected

◆ m_dc

CDC CRhinoDib::m_dc
protected

This Mac-only CDC points at ourself. We deliberately use an instantiated CDC object rather than using the Windows m_pDC so the two very different CDC implementations (Mac and Windows) do not collide and the Mac CDC cannot be deleted independently of this DIB.

◆ m_dib_section

class CRhDibPrivate* CRhinoDib::m_dib_section = nullptr
protected

◆ m_dpi

double CRhinoDib::m_dpi
protected

◆ m_height

int CRhinoDib::m_height
protected

◆ m_is_gray_scale

bool CRhinoDib::m_is_gray_scale
protected

◆ m_width

int CRhinoDib::m_width
protected

◆ m_wLastSaveName

ON_wString CRhinoDib::m_wLastSaveName
mutableprotected