Rhino C++ API
7.19
|
#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 } |
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::FLOAT = 8, ComponentOrders::RUNTIME_24BIT = 3, ComponentOrders::RUNTIME_32BIT = 5 } |
enum | Quality : int { Quality::kHigh, Quality::kMedium, Quality::kLow } |
Public Member Functions | |
CRhinoDib () | |
Construction. More... | |
CRhinoDib (CGImageRef) | |
CRhinoDib (const CRhinoDib &) | |
copy constructor, create bitmap that matches another 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 sepcified width, height and color depth More... | |
virtual | ~CRhinoDib () |
Destruction. More... | |
BOOL | 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... | |
NSBitmapImageRep * | BitmapImageRep () const |
void | BitmapImageRep (NSBitmapImageRep *newBitmapRep) |
CRhinoCacheHandle * | Cache () const |
void | Clear (COLORREF) |
Clears (fills) the entire dib with the passed in color... More... | |
int | ColorDepth () const |
ComponentOrders | ComponentOrder (void) const |
bool | ConvertToGrayScale (bool bSetAlpha=false) |
void | ConvertToNormalMap (bool bLossyCompressionSource, bool &bPositiveZComponent) |
HBITMAP | CopyHBitmap () |
BOOL | CopyToClipboard (HWND hwnd) 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... | |
BOOL | DCSelectBitmap (bool) |
don't know what this might do More... | |
void | DestroyDib () |
Destroy dib && hbitmap and zero out pointers. More... | |
double | DPI () const |
BOOL | Draw (CDC *pDC, CRect rect, int xSrc=0, int ySrc=0) |
BOOL | Draw (CDC *pDC, int x=0, int y=0, int cx=0, int cy=0, int xSrc=0, int ySrc=0) |
Blit functions funtions. More... | |
BOOL | DrawMasked (CDC *pDC, COLORREF crMask, CRect rect, int xSrc=0, int ySrc=0) |
BOOL | DrawMasked (CDC *pDC, COLORREF crMask, int x=0, int y=0, int cx=0, int cy=0, int xSrc=0, int ySrc=0) |
CFastPixelAccess * | FastPixelAccess (void) |
const CFastPixelAccess * | FastPixelAccess (void) const |
BOOL | FillSolid (ON_Color color) |
BOOL | FillSolidRect (CRect &rect, ON_Color color) |
BOOL | FillSolidRect (int x, int y, int nWidth, int nHeight, ON_Color color) |
void | FlipVertical () |
void | GaussianBlurWithRadius (double radius) |
UINT | GetDepth () const |
BOOL | GetPixel (long x, long y, COLORREF &cr) const |
BOOL | GetPixel (long x, long y, COLORREF &cr, int &alpha) const |
BOOL | GetPixel (long x, long y, float &r, float &g, float &b) const |
BOOL | GetPixel (long x, long y, float &r, float &g, float &b, float &alpha) const |
BOOL | GetPixel (long x, long y, int &r, int &g, int &b) 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) |
UINT | GetStorageSize () const |
UINT | GetStorageWidth () const |
UINT | GLDataType () const |
e.g. GL_UNSIGNED_BYTE More... | |
UINT | GLPixelFormat () const |
OpenGL attributes for this image. More... | |
int | Height () const |
NSImage * | Image () const |
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 | IsNormalMap (bool bLossyCompressionSource, bool &bPositiveZComponent) const |
bool | IsNormalMap (void) const |
const wchar_t * | LastSaveName () const |
void | MakeOpaque () |
convert all partially transparent pixels to fully opaque More... | |
long | NumColors () const |
operator CDC * () | |
operator CDC * () const | |
CRhinoDib & | operator= (const CRhinoDib &src) |
CPalette * | Palette () const |
long | PaletteSize () const |
UINT | PelsPerMeter () const |
bool | Print (HWND hWnd=0, bool bFitToPage=true) |
bool | ProcessPixels (bool(*f)(const Pixel &, void *pvData), void *pvData=nullptr) const |
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)(Pixel &, const void *pvData), const 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)(Pixel &, const void *pvData), const void *pvData=nullptr) |
void | ProcessPixels_SingleThreaded (void(*f)(Pixel &, void *pvData), void *pvData=nullptr) |
bool | ReadFromFile (const wchar_t *lpsFileName) |
bool | ReadFromFile (HWND hWnd=0, bool bUseDialogs=true) |
bool | ReadFromFile (unsigned int doc_serial_number, const wchar_t *lpsFileName) |
bool | ReadFromMemory (const void *buffer, int sizeof_buffer) |
void | Resize (int newWidth, int newHeight) |
bool | ReuseDib (int width, int height, int depth, bool select_into_mem_dc) |
unsigned int | RuntimeSerialNumber () const |
long | ScanWidth () const |
void | SetBitmap (CGImageRef) |
void | SetBitmap (HBITMAP) |
BOOL | SetDib (LPBITMAPINFO lpbmi, bool free_lpbmi=true) |
void | SetDPI (double) |
void | SetLastSaveName (const wchar_t *) |
void | SetPelsPerMeter (UINT) |
BOOL | SetPixel (long x, long y, COLORREF cr, int alpha=-1) |
BOOL | 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, int r, int g, int b, int alpha=-1) |
long | Size () const |
Bitmap information. More... | |
long | SizeBits () const |
long | SizeHeader () const |
BOOL | 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... | |
int | Width () const |
long | WidthInBytes () 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 |
Static Public Member Functions | |
static bitmap_file_type | FileTypeFromFileName (const wchar_t *lpsFileName) |
static bool | FileTypeSupportsAlphaChannel (bitmap_file_type fileType) |
static bool | FileTypeSupportsAlphaChannel (const wchar_t *fileName) |
static void | FlipVertical (NSBitmapImageRep *imageRep) |
static ComponentOrders | GLFormatToComponentOrder (GLenum) |
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 () |
void | SetImageRep (NSImageRep *) |
Static Protected Member Functions | |
static int | GetBitmapType (const wchar_t *lpsFileName) |
Protected Attributes | |
unsigned int | m_color_depth |
CDC | m_dc |
double | m_dpi |
int | m_height |
NSBitmapImageRep * | m_image_rep |
bool | m_is_gray_scale |
NSImage * | m_nsimage |
NSImage that contains the above NSBitmapImageRep. More... | |
int | m_width |
ON_wString | m_wLastSaveName |
Friends | |
void | ApplyBufferImageAttributes (class CRhOpenGLTexture2D *, const wchar_t *name, const class CRhTextureAttributes &, class CRhinoDisplayEngine_OGL *, HGLRC) |
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 | CXXXXRender |
GLuint | GetGlTextureForDib (class CRhinoDisplayEngine_OGL &, const CRhinoDib &) |
bool | RhinoUpdateCachedTextureFromDib (unsigned int, const CRhinoDib &) |
class | TestDavidEBitmapFlip |
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 smae 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.
|
strong |
|
strong |
CRhinoDib::CRhinoDib | ( | ) |
Construction.
CRhinoDib::CRhinoDib | ( | int | width, |
int | height, | ||
int | color_depth, | ||
bool | select_into_mem_dc = false , |
||
CPalette * | = NULL |
||
) |
create bitmap with sepcified width, height and color depth
CRhinoDib::CRhinoDib | ( | const CRhinoDib & | ) |
copy constructor, create bitmap that matches another
CRhinoDib::CRhinoDib | ( | HBITMAP | ) |
create Dib from hbitmap
CRhinoDib::CRhinoDib | ( | CGImageRef | ) |
|
virtual |
Destruction.
BOOL CRhinoDib::BitBlt | ( | int | x, |
int | y, | ||
int | nWidth, | ||
int | nHeight, | ||
const CRhinoDib * | srcDC, | ||
int | srcLeft, | ||
int | srcTop, | ||
int | mode | ||
) |
MAC_DEPRECATED HBITMAP CRhinoDib::Bitmap | ( | ) | const |
returns this, which is not very useful
NSBitmapImageRep* CRhinoDib::BitmapImageRep | ( | ) | const |
void CRhinoDib::BitmapImageRep | ( | NSBitmapImageRep * | newBitmapRep | ) |
CRhinoCacheHandle* CRhinoDib::Cache | ( | ) | const |
void CRhinoDib::Clear | ( | COLORREF | ) |
Clears (fills) the entire dib with the passed in color...
int CRhinoDib::ColorDepth | ( | ) | const |
ComponentOrders CRhinoDib::ComponentOrder | ( | void | ) | const |
|
protected |
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.
void CRhinoDib::ConvertToNormalMap | ( | bool | bLossyCompressionSource, |
bool & | bPositiveZComponent | ||
) |
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.
BOOL CRhinoDib::CopyToClipboard | ( | HWND | hwnd | ) | const |
Clipboard operations.
bool CRhinoDib::CreateDib | ( | int | width, |
int | height, | ||
int | color_depth, | ||
bool | select_into_mem_dc = false , |
||
CPalette * | = NULL |
||
) |
DIB or HBITMAP creation functions.
BOOL CRhinoDib::DCSelectBitmap | ( | bool | ) |
don't know what this might do
void CRhinoDib::DestroyDib | ( | ) |
Destroy dib && hbitmap and zero out pointers.
double CRhinoDib::DPI | ( | ) | const |
BOOL CRhinoDib::Draw | ( | CDC * | pDC, |
CRect | rect, | ||
int | xSrc = 0 , |
||
int | ySrc = 0 |
||
) |
BOOL CRhinoDib::Draw | ( | CDC * | pDC, |
int | x = 0 , |
||
int | y = 0 , |
||
int | cx = 0 , |
||
int | cy = 0 , |
||
int | xSrc = 0 , |
||
int | ySrc = 0 |
||
) |
Blit functions funtions.
BOOL CRhinoDib::DrawMasked | ( | CDC * | pDC, |
COLORREF | crMask, | ||
CRect | rect, | ||
int | xSrc = 0 , |
||
int | ySrc = 0 |
||
) |
BOOL CRhinoDib::DrawMasked | ( | CDC * | pDC, |
COLORREF | crMask, | ||
int | x = 0 , |
||
int | y = 0 , |
||
int | cx = 0 , |
||
int | cy = 0 , |
||
int | xSrc = 0 , |
||
int | ySrc = 0 |
||
) |
CFastPixelAccess* CRhinoDib::FastPixelAccess | ( | void | ) |
const CFastPixelAccess* CRhinoDib::FastPixelAccess | ( | void | ) | const |
|
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.
|
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.
|
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.
BOOL CRhinoDib::FillSolid | ( | ON_Color | color | ) |
BOOL CRhinoDib::FillSolidRect | ( | CRect & | rect, |
ON_Color | color | ||
) |
BOOL 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).
void CRhinoDib::FlipVertical | ( | ) |
|
static |
void CRhinoDib::GaussianBlurWithRadius | ( | double | radius | ) |
|
staticprotected |
UINT CRhinoDib::GetDepth | ( | ) | const |
BOOL CRhinoDib::GetPixel | ( | long | x, |
long | y, | ||
COLORREF & | cr | ||
) | const |
BOOL CRhinoDib::GetPixel | ( | long | x, |
long | y, | ||
COLORREF & | cr, | ||
int & | alpha | ||
) | const |
BOOL CRhinoDib::GetPixel | ( | long | x, |
long | y, | ||
float & | r, | ||
float & | g, | ||
float & | b | ||
) | const |
BOOL CRhinoDib::GetPixel | ( | long | x, |
long | y, | ||
float & | r, | ||
float & | g, | ||
float & | b, | ||
float & | alpha | ||
) | const |
BOOL CRhinoDib::GetPixel | ( | long | x, |
long | y, | ||
int & | r, | ||
int & | g, | ||
int & | b | ||
) | const |
BOOL CRhinoDib::GetPixel | ( | long | x, |
long | y, | ||
int & | r, | ||
int & | g, | ||
int & | b, | ||
int & | alpha | ||
) | const |
bool CRhinoDib::GetPixel | ( | unsigned char * | base, |
int | x, | ||
unsigned char * | r, | ||
unsigned char * | g, | ||
unsigned char * | b | ||
) |
|
inline |
UINT CRhinoDib::GetStorageWidth | ( | ) | const |
UINT CRhinoDib::GLDataType | ( | ) | const |
e.g. GL_UNSIGNED_BYTE
|
static |
UINT CRhinoDib::GLPixelFormat | ( | ) | const |
OpenGL attributes for this image.
e.g. GL_RGBA
int CRhinoDib::Height | ( | ) | const |
NSImage* CRhinoDib::Image | ( | ) | const |
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
bool CRhinoDib::IsAllocated | ( | ) | const |
Call this to ensure there is memory allocated. Replace calls to check FindDIBBits() for nullptr with this.
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.
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.
const wchar_t* CRhinoDib::LastSaveName | ( | ) | const |
|
protected |
void CRhinoDib::MakeOpaque | ( | ) |
convert all partially transparent pixels to fully opaque
|
protectedvirtual |
long CRhinoDib::NumColors | ( | ) | const |
CRhinoDib::operator CDC * | ( | ) |
CRhinoDib::operator CDC * | ( | ) | const |
Copy source bitmap, if m_hBitmap is non NULL then create destroy current and create new hBitmap
CPalette* CRhinoDib::Palette | ( | ) | const |
long CRhinoDib::PaletteSize | ( | ) | const |
UINT CRhinoDib::PelsPerMeter | ( | ) | const |
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.
bool CRhinoDib::ProcessPixels | ( | bool(*)(const Pixel &, void *pvData) | f, |
void * | pvData = nullptr |
||
) | const |
bool CRhinoDib::ProcessPixels | ( | bool(*)(Pixel &, void *pvData) | f, |
void * | pvData = nullptr |
||
) |
Pixel iterators with an interupt. Return false in the callback function to interupt the loops. Current implementation is not multithreaded, but this may change.
void CRhinoDib::ProcessPixels | ( | void(*)(const Pixel &, void *pvData) | f, |
void * | pvData = nullptr |
||
) | const |
void CRhinoDib::ProcessPixels | ( | void(*)(Pixel &, const void *pvData) | f, |
const void * | pvData = nullptr |
||
) |
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.
void CRhinoDib::ProcessPixels_SingleThreaded | ( | void(*)(const Pixel &, void *pvData) | f, |
void * | pvData = nullptr |
||
) | const |
void CRhinoDib::ProcessPixels_SingleThreaded | ( | void(*)(Pixel &, const void *pvData) | f, |
const void * | pvData = nullptr |
||
) |
void CRhinoDib::ProcessPixels_SingleThreaded | ( | void(*)(Pixel &, void *pvData) | f, |
void * | pvData = nullptr |
||
) |
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.
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 writen to disk. false - File dialog canceled or error writing file.
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.
|
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.
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
void CRhinoDib::Resize | ( | int | newWidth, |
int | newHeight | ||
) |
bool CRhinoDib::ReuseDib | ( | int | width, |
int | height, | ||
int | depth, | ||
bool | select_into_mem_dc | ||
) |
unsigned int CRhinoDib::RuntimeSerialNumber | ( | ) | const |
long CRhinoDib::ScanWidth | ( | ) | const |
void CRhinoDib::SetBitmap | ( | CGImageRef | ) |
void CRhinoDib::SetBitmap | ( | HBITMAP | ) |
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
void CRhinoDib::SetDPI | ( | double | ) |
|
protected |
void CRhinoDib::SetLastSaveName | ( | const wchar_t * | ) |
void CRhinoDib::SetPelsPerMeter | ( | UINT | ) |
BOOL CRhinoDib::SetPixel | ( | long | x, |
long | y, | ||
COLORREF | cr, | ||
int | alpha = -1 |
||
) |
BOOL CRhinoDib::SetPixel | ( | long | x, |
long | y, | ||
float | r, | ||
float | g, | ||
float | b, | ||
float | alpha = -1.0 |
||
) |
Functions call FindDIBBits and validate x and y.
BOOL CRhinoDib::SetPixel | ( | long | x, |
long | y, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | alpha = -1 |
||
) |
long CRhinoDib::Size | ( | ) | const |
Bitmap information.
long CRhinoDib::SizeBits | ( | ) | const |
long CRhinoDib::SizeHeader | ( | ) | const |
BOOL CRhinoDib::StretchBlt | ( | int | x, |
int | y, | ||
int | nWidth, | ||
int | nHeight, | ||
const CRhinoDib * | srcDC, | ||
int | xSrc, | ||
int | ySrc, | ||
int | nSrcWidth, | ||
int | nSrcHeight, | ||
int | mode | ||
) |
void CRhinoDib::SwapRedAndBlueSamples | ( | ) |
exchange the red and blue color bytes in the NSBitmapImageRep
int CRhinoDib::Width | ( | ) | const |
long CRhinoDib::WidthInBytes | ( | ) | const |
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 writen to disk. false - Error writing file or invalid file type.
bool CRhinoDib::WriteToFile | ( | HWND | hWnd = 0 , |
bool | bUseDialogs = true , |
||
Quality | q = Quality::kHigh |
||
) | const |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
friend void Combine(const CRhinoDib&, CRhinoDib&, const float*, float*);
|
friend |
|
friend |
|
friend |
|
friend |
friend class CRhinoZBuffer; friend class CRhinoRenderOverlays;
|
friend |
|
friend |
|
friend |
This is a list of the badly behaved.
|
friend |
|
friend |
|
friend |
friend CRhinoDib* RhinoCreateAnaglyph(const CRhinoDib&, const CRhinoDib&,const int); friend void ConvertDepthToImage(CRhinoDib&, bool);
|
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.
|
friend |
|
protected |
|
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.
|
protected |
|
protected |
|
protected |
Native OS X NSBitmapImageRep data is stored top row first. Windows bitmaps are stored bottom row first. Rhino code expects to access the raw pixels in a CRhinoDib, so the pixels stored in m_image are stored bottom row first.
|
protected |
|
protected |
NSImage that contains the above NSBitmapImageRep.
|
protected |
|
mutableprotected |