CFx SDK Documentation
2020SP3
|
#include <GiRasterImage.h>
Classes | |
struct | tagPixelFormatInfo |
Public Types | |
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 |
Public Member Functions | |
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 OdUInt8 * | scanLines () 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 OdString & | sourceFileName () const |
virtual TransparencyMode | transparencyMode () const |
OdSmartPtr< OdGiRasterImage > | changeImageSource (ImageSource source, const OdChar *pFileName=NULL) |
OdSmartPtr< OdGiRasterImage > | changeSourceFileName (const OdString &fileName) |
OdSmartPtr< OdGiRasterImage > | changeTransparencyMode (TransparencyMode mode) |
OdSmartPtr< OdGiRasterImage > | convert (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< OdGiRasterImage > | crop (OdUInt32 x, OdUInt32 y, OdUInt32 width, OdUInt32 height) const |
virtual void * | imp () const |
Public Member Functions inherited from OdRxObject | |
ODRX_HEAP_OPERATORS () | |
OdRxObject () | |
virtual | ~OdRxObject () |
virtual OdRxObject * | queryX (const OdRxClass *pClass) const |
virtual OdRxObject * | x (const OdRxClass *pClass) const |
virtual OdRxClass * | isA () 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 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 OdRxClass * | desc () |
This class represents a raster image within the Teigha vectorization framework. Corresponding C++ library: TD_Gi <group OdGi_Classes>
Definition at line 36 of file GiRasterImage.h.
Enumerator | |
---|---|
kUndefinedSource | |
kFromDwg | |
kFromOleObject | |
kFromRender | |
kFromUnderlay | |
kFromImageBGRA32 | |
kFromPdfUnderlay | |
kFromFile |
Definition at line 66 of file GiRasterImage.h.
Enumerator | |
---|---|
kTransparencyDef | |
kTransparencyOff | |
kTransparency1Bit | |
kTransparency8Bit |
Definition at line 81 of file GiRasterImage.h.
Definition at line 41 of file GiRasterImage.h.
Returns the size of a single scanline in BMP format for this RasterImage object.
pixelWidth | [in] Image width in pixels. |
colorDepth | [in] Number of bits per pixel. |
|
static |
Returns the 32-bit mask for the requested number of color bits and offset.
numColorBits | [in] Number of color bits. |
colorOffset | [in] Offset of color bits. |
OdSmartPtr<OdGiRasterImage> OdGiRasterImage::changeImageSource | ( | ImageSource | source, |
const OdChar * | pFileName = NULL |
||
) |
Sets an image source and (optionally) source file name.
source | [in] New image source value. |
pFileName | [in] Optional value for source file name. |
OdSmartPtr<OdGiRasterImage> OdGiRasterImage::changeSourceFileName | ( | const OdString & | fileName | ) |
Sets an image source file name.
fileName | [in] New value for source file name. |
OdSmartPtr<OdGiRasterImage> OdGiRasterImage::changeTransparencyMode | ( | TransparencyMode | mode | ) |
Sets transparency mode for 32bpp formats.
mode | [in] New transparency mode. |
|
pure virtual |
Returns the color for the specified index from the palette of this RasterImage object.
colorIndex | [in] Color index. |
Implemented in OdGiRasterImageAlphaChannelAdder, OdGiInversionRasterTransformer, OdGiBitonalRasterTransformer, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
|
pure virtual |
Returns the number of bits per pixel used for colors by this RasterImage object.
Implemented in OdGiRasterImageAlphaChannelAdder, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
OdSmartPtr<OdGiRasterImage> OdGiRasterImage::convert | ( | 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 |
Converts this raster image as specified.
convertPaletteToRGB | [in] Color is converted to RGB if and only if true. |
brightness | [in] Image brightness [0 .. 100]. |
contrast | [in] Image contrast [0 .. 100]. |
fade | [in] Image fade value [0 .. 100]. |
backgroundColor | [in] Background color. |
flipX | [in] Image is flipped about the X-axis if and only if true. |
flipY | [in] Image is flipped about the Y-axis if and only if true. |
rotate90 | [in] Image is rotated 90° if and only if true. |
pDestDesc | [in] Pointer to an OdGiRasterImageDesc object to receive the image parameters. |
transparency | [in] Image is transparent if true. |
|
virtual |
Crops this raster image using a rectangle. The format of returned raster image is identical to the format of the source raster image.
x | [in] X-coordinate of start point. |
y | [in] Y-coordinate of start point. |
width | [in] Width of the crop rectangle. |
height | [in] Height of the crop rectangle. |
|
virtual |
Returns the default image resolution in pixels per unit of this RasterImage object.
xPelsPerUnit | [out] Receives the pixels per unit value (x direction). |
yPelsPerUnit | [out] Receives the pixels per unit value (y direction). |
Reimplemented in OdGiRasterImageAlphaChannelAdder, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
|
virtual |
Returns the image source.
Reimplemented in OdGiRasterImageAlphaChannelAdder, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
|
virtual |
Returns user-end implementation of raster image.
Reimplemented in OdGiRasterImageWrapper.
|
pure virtual |
Returns the number of colors in the palette of this RasterImage object.
Implemented in OdGiRasterImageAlphaChannelAdder, OdGiBitonalRasterTransformer, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
OdGiRasterImage::ODRX_DECLARE_MEMBERS | ( | OdGiRasterImage | ) |
Returns the palette in BMP format of this RasterImage object.
bytes | [out] Receives the palette data. |
Implemented in OdGiRasterImageAlphaChannelAdder, OdGiInversionRasterTransformer, OdGiBitonalRasterTransformer, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
|
pure virtual |
Returns the size (in bytes) of the palette data of this RasterImage object.
Implemented in OdGiRasterImageAlphaChannelAdder, OdGiBitonalRasterTransformer, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
|
pure virtual |
Returns the pixel format for this RasterImage object.
Implemented in OdGiRasterImageAlphaChannelAdder, OdGiBitonalRasterTransformer, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
|
pure virtual |
Returns the image height in pixels of this RasterImage object.
Implemented in OdGiRasterImageAlphaChannelAdder, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
|
pure virtual |
Returns the image width in pixels of this RasterImage object.
Implemented in OdGiRasterImageAlphaChannelAdder, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
|
pure virtual |
Returns the set of scanlines.
Implemented in OdGiRasterImageAlphaChannelAdder, OdGiInversionRasterTransformer, OdGiLeftToRightRasterTransformer, OdGiUpsideDownRasterTransformer, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
|
pure virtual |
Returns the specified set of scanlines in BMP format from this RasterImage object, or the pixel data in BMP format for this RasterImage object.
scnLines | [out] Receives the scanline data. |
firstScanline | [in] Index of first scanline to retrieve. |
numLines | [in] Number of scanlines to retrieve. |
Implemented in OdGiRasterImageAlphaChannelAdder, OdGiInversionRasterTransformer, OdGiLeftToRightRasterTransformer, OdGiUpsideDownRasterTransformer, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
|
pure virtual |
Returns the scanline alignment, in bytes, for this RasterImage object. Example: scanLinesAlignment() returns 4 for Windows BMP.
Implemented in OdGiRasterImageAlphaChannelAdder, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
|
virtual |
Returns the scanline size of this RasterImage object.
Reimplemented in OdGiRasterImageAlphaChannelAdder, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
|
virtual |
Returns the image source file name.
Reimplemented in OdGiRasterImageWrapper, OdGiRasterImageHolder, and OdGiRasterImageDesc.
|
virtual |
Returns the transparency mode for 32bpp formats.
Reimplemented in OdGiRasterImageAlphaChannelAdder, OdGiRasterImageWrapper, OdGiRasterImageHolder, OdGiRasterImageBGRA32, and OdGiRasterImageDesc.
|
virtual |
Returns the index of transparent color in the image.
Reimplemented in OdGiBitonalRasterTransformer, OdGiRasterImageWrapper, and OdGiRasterImageHolder.