3ds Max C++ API Reference
Loading...
Searching...
No Matches
GPort Class Referenceabstract

Deprecated utility class for managing user interface colors. More...

#include <gport.h>

+ Inheritance diagram for GPort:

Public Member Functions

virtual ~GPort ()
 
virtual void DisplayMap (HDC hdc, Rect &drect, int xsrc, int ysrc, UBYTE *map, int bytesPerRow)=0
 
virtual void DisplayMap (HDC hdc, Rect &dest, Rect &src, UBYTE *map, int bytesPerRow)=0
 
virtual void FillColorSwatch (HDC hdc, const Rect &rect, const Color color, bool transformColors=true)=0
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 

Detailed Description

Deprecated utility class for managing user interface colors.

Deprecated:
This class is deprecated and will be removed in the future.
See also
Advanced Topics on Color Palettes, Class Color, Class GammaMgr, COLORREF.

Description:
A useful utility class for managing user interface colors. This class has several purposes:

Maintain the default 3ds Max palette for doing 256 color graphics.

Provides a mechanism for allocating "animated color slots" in the default palette for use in the user interface.

Provide various functions for doing dithered graphics using the default 3ds Max palette.

All methods of this class are implemented by the system.

The following global function is used to get a pointer that may be used to call the methods of this class:

Constructor & Destructor Documentation

◆ ~GPort()

virtual ~GPort ( )
inlinevirtual
Remarks
Destructor
42{;}

Member Function Documentation

◆ DisplayMap() [1/2]

virtual void DisplayMap ( HDC  hdc,
Rect drect,
int  xsrc,
int  ysrc,
UBYTE map,
int  bytesPerRow 
)
pure virtual
Remarks
Display an array of 24 bit colors in the HDC. If the current display is 8 bit it will display it (with dither) using in the GPort palette, otherwise it will just blit to the screen. This method does NOT do gamma correction.
Parameters:
HDC hdc

The handle of the device context.

Rect& drect

The destination rectangle in the hdc.

int xsrc

The X position within this source raster of the upper left corner of the rectangle to be copied.

int ysrc

The Y position within this source raster of the upper left corner of the rectangle to be copied.

UBYTE *map

Points to an array of BGR triples.

int bytesPerRow

The number of bytes per row on each scanline of map.

◆ DisplayMap() [2/2]

virtual void DisplayMap ( HDC  hdc,
Rect dest,
Rect src,
UBYTE map,
int  bytesPerRow 
)
pure virtual
Remarks
This version of DisplayMap() stretches the image if the source rectangle is not the same size as the destination rectangle. src should be the size of the image.
Parameters:
HDC hdc

The handle of the device context.

Rect& dest

The destination rectangle in the hdc.

Rect& src

The source rectangle in map.

UBYTE *map

Points to an array of RGB triples.

int bytesPerRow

The number of bytes per row on each scanline of map.

◆ FillColorSwatch()

virtual void FillColorSwatch ( HDC  hdc,
const Rect rect,
const Color  color,
bool  transformColors = true 
)
pure virtual