CFx SDK Documentation  2020SP3
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
OdGiRasterImageBGRA32 Class Reference

#include <GiRasterWrappers.h>

Inheritance diagram for OdGiRasterImageBGRA32:
OdGiRasterImageParam OdGiRasterImage OdRxObject OdGiRasterImageBGRA32Holder OdGiRasterImageBGRA32Copy

Public Member Functions

 OdGiRasterImageBGRA32 ()
 
virtual ~OdGiRasterImageBGRA32 ()
 
OdUInt32 pixelWidth () const
 
OdUInt32 pixelHeight () const
 
OdUInt32 colorDepth () const
 
OdUInt32 numColors () const
 
ODCOLORREF color (OdUInt32 colorIndex) const
 
OdUInt32 paletteDataSize () const
 
void paletteData (OdUInt8 *bytes) const
 
OdUInt32 scanLineSize () const
 
const OdUInt8scanLines () const
 
void scanLines (OdUInt8 *scnLines, OdUInt32 firstScanline, OdUInt32 numLines=1) const
 
OdGiRasterImage::PixelFormatInfo pixelFormat () const
 
OdUInt32 scanLinesAlignment () const
 
OdGiRasterImage::Units defaultResolution (double &xPelsPerUnit, double &yPelsPerUnit) const
 
OdUInt32 supportedParams () const
 
OdGiRasterImage::ImageSource imageSource () const
 
OdGiRasterImage::TransparencyMode transparencyMode () const
 
void setTransparencyMode (OdGiRasterImage::TransparencyMode mode)
 
OdRxObjectPtr clone () const
 
void copyFrom (const OdRxObject *pSource)
 
- Public Member Functions inherited from OdGiRasterImageParam
 ODRX_DECLARE_MEMBERS (OdGiRasterImageParam)
 
virtual void setImageSource (ImageSource source)
 
virtual void setSourceFileName (const OdString &fileName)
 
- Public Member Functions inherited from OdGiRasterImage
 ODRX_DECLARE_MEMBERS (OdGiRasterImage)
 
virtual int transparentColor () const
 
virtual const OdStringsourceFileName () const
 
OdSmartPtr< OdGiRasterImagechangeImageSource (ImageSource source, const OdChar *pFileName=NULL)
 
OdSmartPtr< OdGiRasterImagechangeSourceFileName (const OdString &fileName)
 
OdSmartPtr< OdGiRasterImagechangeTransparencyMode (TransparencyMode mode)
 
OdSmartPtr< OdGiRasterImageconvert (bool convertPaletteToRGB, double brightness=50.0, double contrast=50.0, double fade=0.0, ODCOLORREF backgroundColor=0, bool flipX=false, bool flipY=false, bool rotate90=false, const OdGiRasterImage *pDestDesc=0, bool transparency=false) const
 
virtual OdSmartPtr< OdGiRasterImagecrop (OdUInt32 x, OdUInt32 y, OdUInt32 width, OdUInt32 height) const
 
virtual voidimp () const
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Static Public Member Functions

static OdGiRasterImagePtr createObject (OdGiImageBGRA32 *pImage, OdGiRasterImage::TransparencyMode transparencyMode=OdGiRasterImage::kTransparency8Bit)
 
- Static Public Member Functions inherited from OdGiRasterImage
static OdUInt32 calcBMPScanLineSize (OdUInt32 pixelWidth, int colorDepth)
 
static OdUInt32 calcColorMask (OdUInt8 numColorBits, OdUInt8 colorOffset=0)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Protected Attributes

OdGiImageBGRA32m_pBGRAImage
 
OdGiRasterImage::TransparencyMode m_transparencyMode
 

Additional Inherited Members

- Public Types inherited from OdGiRasterImageParam
enum  ParamType { kImageSource = (1 << 0), kTransparencyMode = (1 << 1), kSourceFileName = (1 << 2) }
 
- Public Types inherited from OdGiRasterImage
enum  Units {
  kNone = 0, kMillimeter, kCentimeter, kMeter,
  kKilometer, kInch, kFoot, kYard,
  kMile, kMicroinches, kMils, kAngstroms,
  kNanometers, kMicrons, kDecimeters, kDekameters,
  kHectometers, kGigameters, kAstronomical, kLightYears,
  kParsecs
}
 
enum  ImageSource {
  kUndefinedSource = -1, kFromDwg = 0, kFromOleObject = 1, kFromRender = 2,
  kFromUnderlay = 10, kFromImageBGRA32 = 11, kFromPdfUnderlay = kFromOleObject, kFromFile = kFromDwg
}
 
enum  TransparencyMode { kTransparencyDef = -1, kTransparencyOff = 0, kTransparency1Bit = 1, kTransparency8Bit = 2 }
 
typedef struct OdGiRasterImage::tagPixelFormatInfo PixelFormatInfo
 

Detailed Description

Emulates OdGiImageBGRA32 within the OdGiRasterImage interface.

Remarks
Stores only a pointer to the original image, not a SmartPointer, so deletion of the original image before this class may cause an access violation error. Corresponding C++ library: TD_Gi <group OdGi_Classes>

Definition at line 292 of file GiRasterWrappers.h.

Constructor & Destructor Documentation

◆ OdGiRasterImageBGRA32()

OdGiRasterImageBGRA32::OdGiRasterImageBGRA32 ( )

◆ ~OdGiRasterImageBGRA32()

virtual OdGiRasterImageBGRA32::~OdGiRasterImageBGRA32 ( )
virtual

Member Function Documentation

◆ clone()

OdRxObjectPtr OdGiRasterImageBGRA32::clone ( ) const
virtual

Creates a clone of this object, and returns a pointer to the clone.

Reimplemented from OdRxObject.

Reimplemented in OdGiRasterImageBGRA32Copy, and OdGiRasterImageBGRA32Holder.

◆ color()

ODCOLORREF OdGiRasterImageBGRA32::color ( OdUInt32  colorIndex) const
virtual

Returns the color for the specified index from the palette of this RasterImage object.

Parameters
colorIndex[in] Color index.

Implements OdGiRasterImage.

◆ colorDepth()

OdUInt32 OdGiRasterImageBGRA32::colorDepth ( ) const
virtual

Returns the number of bits per pixel used for colors by this RasterImage object.

Implements OdGiRasterImage.

◆ copyFrom()

void OdGiRasterImageBGRA32::copyFrom ( const OdRxObject pSource)
virtual

Copies data of a source object to the current object.

Parameters
pSource[in] Input source object.

Reimplemented from OdRxObject.

Reimplemented in OdGiRasterImageBGRA32Copy, and OdGiRasterImageBGRA32Holder.

◆ createObject()

static OdGiRasterImagePtr OdGiRasterImageBGRA32::createObject ( OdGiImageBGRA32 pImage,
OdGiRasterImage::TransparencyMode  transparencyMode = OdGiRasterImage::kTransparency8Bit 
)
static

Creates an OdGiRasterImageBGRA32 object with the specified parameters.

Parameters
pImage[in] Input BGRA32 image.
transparencyMode[in] Transparency mode.
Returns
Returns a SmartPointer to the newly created object.

◆ defaultResolution()

OdGiRasterImage::Units OdGiRasterImageBGRA32::defaultResolution ( double &  xPelsPerUnit,
double &  yPelsPerUnit 
) const
virtual

Returns the default image resolution in pixels per unit of this RasterImage object.

Parameters
xPelsPerUnit[out] Receives the pixels per unit value (x direction).
yPelsPerUnit[out] Receives the pixels per unit value (y direction).
Remarks
If the returned value is kNone, then xPelsPerUnit and yPelsPerUnit are not set.

Reimplemented from OdGiRasterImage.

◆ imageSource()

OdGiRasterImage::ImageSource OdGiRasterImageBGRA32::imageSource ( ) const
virtual

Returns the image source.

Reimplemented from OdGiRasterImage.

◆ numColors()

OdUInt32 OdGiRasterImageBGRA32::numColors ( ) const
virtual

Returns the number of colors in the palette of this RasterImage object.

Implements OdGiRasterImage.

◆ paletteData()

void OdGiRasterImageBGRA32::paletteData ( OdUInt8 bytes) const
virtual

Returns the palette in BMP format of this RasterImage object.

Parameters
bytes[out] Receives the palette data.
Remarks
It is up to the caller to allocate sufficient memory for the palette data.

Implements OdGiRasterImage.

◆ paletteDataSize()

OdUInt32 OdGiRasterImageBGRA32::paletteDataSize ( ) const
virtual

Returns the size (in bytes) of the palette data of this RasterImage object.

Implements OdGiRasterImage.

◆ pixelFormat()

OdGiRasterImage::PixelFormatInfo OdGiRasterImageBGRA32::pixelFormat ( ) const
virtual

Returns the pixel format for this RasterImage object.

Remarks
This function returns the pixel format of the palette, unless there is no palette, in which case it returns the pixel format of the image itself.

Implements OdGiRasterImage.

◆ pixelHeight()

OdUInt32 OdGiRasterImageBGRA32::pixelHeight ( ) const
virtual

Returns the image height in pixels of this RasterImage object.

Implements OdGiRasterImage.

◆ pixelWidth()

OdUInt32 OdGiRasterImageBGRA32::pixelWidth ( ) const
virtual

Returns the image width in pixels of this RasterImage object.

Implements OdGiRasterImage.

◆ scanLines() [1/2]

const OdUInt8* OdGiRasterImageBGRA32::scanLines ( ) const
virtual

Returns the set of scanlines.

Remarks
Implementation of this function is optional; NULL can be returned if it is inconvenient to implement. The caller must take into account that the return value can be NULL. If this method returns NULL, scanlines can be accessed by a second version of the scanLines() method with arguments where a memory buffer for scalines data is preallocated by the caller.

Implements OdGiRasterImage.

◆ scanLines() [2/2]

void OdGiRasterImageBGRA32::scanLines ( OdUInt8 scnLines,
OdUInt32  firstScanline,
OdUInt32  numLines = 1 
) const
virtual

Returns the specified set of scanlines in BMP format for this RasterImage object, or the pixel data in BMP format for this RasterImage object.

Parameters
scnLines[out] Receives the scanline data.
firstScanline[in] Index of first scanline to retrieve.
numLines[in] Number of scanlines to retrieve.
Remarks
The number of accessible scanlines is equal to the value returned by pixelHeight(). The number of accessible bytes in a scanline is equal to the value returned by scanLineSize(). The scanline returned by firstScanline == 0 is the first scanline in the image. The scanline returned by firstScanline == (pixelHeight() - 1) is the last scanline in the image.
It us up to the caller to allocate sufficient memory for the scanline data.

Implements OdGiRasterImage.

◆ scanLinesAlignment()

OdUInt32 OdGiRasterImageBGRA32::scanLinesAlignment ( ) const
virtual

Returns the scanline alignment, in bytes, for this RasterImage object. Example: scanLinesAlignment() returns 4 for Windows BMP.

Implements OdGiRasterImage.

◆ scanLineSize()

OdUInt32 OdGiRasterImageBGRA32::scanLineSize ( ) const
virtual

Returns the scanline size of this RasterImage object.

Remarks
This function returns the number of bytes between the beginning of scanline N and the beginning of scanline N+1 (taking into account any padding that is added to the end of the scanline).

Reimplemented from OdGiRasterImage.

◆ setTransparencyMode()

void OdGiRasterImageBGRA32::setTransparencyMode ( OdGiRasterImage::TransparencyMode  mode)
virtual

Sets an image transparency mode.

Parameters
mode[in] New transparency mode value.

Reimplemented from OdGiRasterImageParam.

◆ supportedParams()

OdUInt32 OdGiRasterImageBGRA32::supportedParams ( ) const
virtual

Returns the ParamType bitflags with which parameters are supported by this interface.

Implements OdGiRasterImageParam.

◆ transparencyMode()

OdGiRasterImage::TransparencyMode OdGiRasterImageBGRA32::transparencyMode ( ) const
virtual

Returns the transparency mode for 32bpp formats.

Reimplemented from OdGiRasterImage.

Member Data Documentation

◆ m_pBGRAImage

OdGiImageBGRA32* OdGiRasterImageBGRA32::m_pBGRAImage
protected

Definition at line 295 of file GiRasterWrappers.h.

◆ m_transparencyMode

OdGiRasterImage::TransparencyMode OdGiRasterImageBGRA32::m_transparencyMode
protected

Definition at line 296 of file GiRasterWrappers.h.


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