CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
OdGiBitonalRasterTransformer Class Reference

#include <GiRasterWrappers.h>

Inheritance diagram for OdGiBitonalRasterTransformer:
OdGiRasterImageWrapper OdGiRasterImageParam OdGiRasterImage OdRxObject

Public Member Functions

 OdGiBitonalRasterTransformer ()
 
virtual ~OdGiBitonalRasterTransformer ()
 
void setOriginal (const OdGiRasterImage *pOrig, ODCOLORREF foregroundColor, ODCOLORREF backgroundColor, bool transparent)
 
OdUInt32 numColors () const
 
ODCOLORREF color (OdUInt32 colorIndex) const
 
OdUInt32 paletteDataSize () const
 
void paletteData (OdUInt8 *bytes) const
 
PixelFormatInfo pixelFormat () const
 
int transparentColor () const
 
OdRxObjectPtr clone () const
 
void copyFrom (const OdRxObject *pSource)
 
- Public Member Functions inherited from OdGiRasterImageWrapper
 OdGiRasterImageWrapper ()
 
virtual ~OdGiRasterImageWrapper ()
 
void setOriginal (const OdGiRasterImage *pOrig)
 
const OdGiRasterImageoriginal () const
 
OdGiRasterImagePtr cloneOriginal () const
 
OdUInt32 pixelWidth () const
 
OdUInt32 pixelHeight () const
 
Units defaultResolution (double &xPelsPerUnit, double &yPelsPerUnit) const
 
OdUInt32 colorDepth () const
 
OdUInt32 numColors () const
 
ODCOLORREF color (OdUInt32 colorIndex) const
 
OdUInt32 paletteDataSize () const
 
void paletteData (OdUInt8 *bytes) const
 
OdUInt32 scanLineSize () const
 
void scanLines (OdUInt8 *scnLines, OdUInt32 firstScanline, OdUInt32 numLines=1) const
 
const OdUInt8scanLines () const
 
PixelFormatInfo pixelFormat () const
 
OdUInt32 scanLinesAlignment () const
 
int transparentColor () const
 
ImageSource imageSource () const
 
const OdStringsourceFileName () const
 
TransparencyMode transparencyMode () const
 
OdUInt32 supportedParams () const
 
void setImageSource (ImageSource source)
 
void setSourceFileName (const OdString &fileName)
 
void setTransparencyMode (TransparencyMode mode)
 
voidimp () const
 
OdRxObjectPtr clone () const
 
void copyFrom (const OdRxObject *pSource)
 
- Public Member Functions inherited from OdGiRasterImageParam
 ODRX_DECLARE_MEMBERS (OdGiRasterImageParam)
 
virtual OdUInt32 supportedParams () const =0
 
virtual void setImageSource (ImageSource source)
 
virtual void setSourceFileName (const OdString &fileName)
 
virtual void setTransparencyMode (TransparencyMode mode)
 
- Public Member Functions inherited from OdGiRasterImage
 ODRX_DECLARE_MEMBERS (OdGiRasterImage)
 
virtual OdUInt32 pixelWidth () const =0
 
virtual OdUInt32 pixelHeight () const =0
 
virtual Units defaultResolution (double &xPelsPerUnit, double &yPelsPerUnit) const
 
virtual OdUInt32 colorDepth () const =0
 
virtual OdUInt32 numColors () const =0
 
virtual int transparentColor () const
 
virtual ODCOLORREF color (OdUInt32 colorIndex) const =0
 
virtual OdUInt32 paletteDataSize () const =0
 
virtual void paletteData (OdUInt8 *bytes) const =0
 
virtual OdUInt32 scanLineSize () const
 
virtual const OdUInt8scanLines () const =0
 
virtual void scanLines (OdUInt8 *scnLines, OdUInt32 firstScanline, OdUInt32 numLines=1) const =0
 
virtual PixelFormatInfo pixelFormat () const =0
 
virtual OdUInt32 scanLinesAlignment () const =0
 
virtual ImageSource imageSource () const
 
virtual const OdStringsourceFileName () const
 
virtual TransparencyMode transparencyMode () 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 OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Static Public Member Functions

static OdGiRasterImagePtr createObject (const OdGiRasterImage *pOrig, ODCOLORREF foregroundColor, ODCOLORREF backgroundColor, bool transparent)
 
- Static Public Member Functions inherited from OdGiRasterImage
static double millimetersInUnit (Units units)
 
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 ()
 

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

This raster image transformer class transforms OdGiRasterImage objects to Bitonal images.

Corresponding C++ library: TD_Gi

Remarks
Transforming an image does not affect the orignal. <group OdGi_Classes>
See also
<link gi_raster_images, Work with Raster Images>

Definition at line 1076 of file GiRasterWrappers.h.

Constructor & Destructor Documentation

◆ OdGiBitonalRasterTransformer()

OdGiBitonalRasterTransformer::OdGiBitonalRasterTransformer ( )

Default constructor for the OdGiBitonalRasterTransformer class. Sets transparency color to -1 (absent).

◆ ~OdGiBitonalRasterTransformer()

virtual OdGiBitonalRasterTransformer::~OdGiBitonalRasterTransformer ( )
virtual

Destructor for the OdGiBitonalRasterTransformer class.

Member Function Documentation

◆ clone()

OdRxObjectPtr OdGiBitonalRasterTransformer::clone ( ) const
virtual

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

Returns
smart pointer to the cloned object.

Reimplemented from OdGiRasterImageWrapper.

◆ color()

ODCOLORREF OdGiBitonalRasterTransformer::color ( OdUInt32  colorIndex) const
virtual

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

Parameters
colorIndex[in] Color index.
Returns
color at the specified index as ODCOLORREF (OdUInt32) value.

Reimplemented from OdGiRasterImageWrapper.

◆ copyFrom()

void OdGiBitonalRasterTransformer::copyFrom ( const OdRxObject pSource)
virtual

Copies data of a source object to the current object.

Parameters
pSource[in] Input source object.

Reimplemented from OdGiRasterImageWrapper.

◆ createObject()

static OdGiRasterImagePtr OdGiBitonalRasterTransformer::createObject ( const OdGiRasterImage pOrig,
ODCOLORREF  foregroundColor,
ODCOLORREF  backgroundColor,
bool  transparent 
)
static

Creates a bitonal raster transformer.

Parameters
pOrig[in] Original raster image pointer.
foregroundColor[in] Foreground color.
backgroundColor[in] Background color.
transparent[in] Image is transparent if and only if true.
Returns
smart pointer to the created object.

◆ numColors()

OdUInt32 OdGiBitonalRasterTransformer::numColors ( ) const
virtual

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

Returns
number of colors in the palette.

Reimplemented from OdGiRasterImageWrapper.

◆ paletteData()

void OdGiBitonalRasterTransformer::paletteData ( OdUInt8 bytes) const
virtual

Retrieves the palette in BMP format of this RasterImage object.

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

Reimplemented from OdGiRasterImageWrapper.

◆ paletteDataSize()

OdUInt32 OdGiBitonalRasterTransformer::paletteDataSize ( ) const
virtual

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

Returns
number of bytes that represents palette data size.

Reimplemented from OdGiRasterImageWrapper.

◆ pixelFormat()

PixelFormatInfo OdGiBitonalRasterTransformer::pixelFormat ( ) const
virtual

Retrieves the pixel format for this RasterImage object.

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

Reimplemented from OdGiRasterImageWrapper.

◆ setOriginal()

void OdGiBitonalRasterTransformer::setOriginal ( const OdGiRasterImage pOrig,
ODCOLORREF  foregroundColor,
ODCOLORREF  backgroundColor,
bool  transparent 
)

Sets bitonal raster transformer parameters.

Parameters
pOrig[in] Original raster image pointer.
foregroundColor[in] Foreground color.
backgroundColor[in] Background color.
transparent[in] Image is transparent if and only if true.

◆ transparentColor()

int OdGiBitonalRasterTransformer::transparentColor ( ) const
virtual

Retrieves the index of transparent color in the image.

Returns
-1 because there is no transparency color for a bitonal image.

Reimplemented from OdGiRasterImageWrapper.


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