CFx SDK Documentation 2024 SP0
|
#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 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 OdRxClass * | desc () |
This class represents a raster image within the ODA Platform vectorization framework. Corresponding C++ library: TD_Gi
<group OdGi_Classes>
Definition at line 40 of file GiRasterImage.h.
Represents data for pixel formatting.
This enumeration represents sources for raster images.
Enumerator | |
---|---|
kUndefinedSource | Flag not set (unknown source). |
kFromDwg | Raster image loaded from raster image definition. |
kFromOleObject | Raster image generated from OLE data source. |
kFromRender | Raster image generated from rendering. |
kFromUnderlay | Raster image is a part of underlay. |
kFromImageBGRA32 | Raster image wraps an OdGiImageBGRA32 image. |
kFromPdfUnderlay | Raster image generated from PdfUnderlay. |
kFromFile | Raster image generated from a disk file. |
Definition at line 157 of file GiRasterImage.h.
This enumeration represents transparency modes.
Definition at line 183 of file GiRasterImage.h.
This enumeration represents measurement units.
Definition at line 50 of file GiRasterImage.h.
Retrieves 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 |
Retrieves 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 |
Retrieves the color for the specified index from the palette of this RasterImage object.
colorIndex | [in] Color index. |
Implemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, OdGiBitonalRasterTransformer, OdGiInversionRasterTransformer, and OdGiRasterImageAlphaChannelAdder.
|
pure virtual |
Retrieves the number of bits per pixel used for colors by this RasterImage object.
Implemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, and OdGiRasterImageAlphaChannelAdder.
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 the start point. |
y | [in] Y-coordinate of the start point. |
width | [in] Width of the crop rectangle. |
height | [in] Height of the crop rectangle. |
|
virtual |
Retrieves 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 OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, and OdGiRasterImageAlphaChannelAdder.
|
virtual |
Retrieves the image source.
Reimplemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, and OdGiRasterImageAlphaChannelAdder.
|
virtual |
Retrieves a user-end implementation of the raster image.
Reimplemented in OdGiRasterImageWrapper.
|
inlinestatic |
Returns number of millimeters in a given unit.
units | [in] Input measurement unit. |
Definition at line 103 of file GiRasterImage.h.
|
pure virtual |
Retrieves the number of colors in the palette of this RasterImage object.
Implemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, OdGiBitonalRasterTransformer, and OdGiRasterImageAlphaChannelAdder.
OdGiRasterImage::ODRX_DECLARE_MEMBERS | ( | OdGiRasterImage | ) |
Retrieves the palette in BMP format of this RasterImage object.
bytes | [out] Receives the palette data. |
Implemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, OdGiBitonalRasterTransformer, OdGiInversionRasterTransformer, and OdGiRasterImageAlphaChannelAdder.
|
pure virtual |
Retrieves the size (in bytes) of the palette data of this RasterImage object.
Implemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, OdGiBitonalRasterTransformer, and OdGiRasterImageAlphaChannelAdder.
|
pure virtual |
Retrieves the pixel format for this RasterImage object.
Implemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, OdGiBitonalRasterTransformer, and OdGiRasterImageAlphaChannelAdder.
|
pure virtual |
Retrieves the image height in pixels of this RasterImage object.
Implemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, and OdGiRasterImageAlphaChannelAdder.
|
pure virtual |
Retrieves the image width in pixels of this RasterImage object.
Implemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, and OdGiRasterImageAlphaChannelAdder.
|
pure virtual |
Retrieves the set of scanlines.
Implemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, OdGiUpsideDownRasterTransformer, OdGiLeftToRightRasterTransformer, OdGiInversionRasterTransformer, and OdGiRasterImageAlphaChannelAdder.
|
pure virtual |
Retrieves 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 the first scanline to retrieve. |
numLines | [in] Number of scanlines to retrieve. |
Implemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, OdGiUpsideDownRasterTransformer, OdGiLeftToRightRasterTransformer, OdGiInversionRasterTransformer, and OdGiRasterImageAlphaChannelAdder.
|
pure virtual |
Retrieves the scanline alignment in bytes for this RasterImage object. Example: scanLinesAlignment() returns 4 for Windows BMP.
Implemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, and OdGiRasterImageAlphaChannelAdder.
|
virtual |
Retrieves the scanline size of this RasterImage object.
Reimplemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, and OdGiRasterImageAlphaChannelAdder.
|
virtual |
Retrieves the image source file name.
Reimplemented in OdGiRasterImageDesc, OdGiRasterImageHolder, and OdGiRasterImageWrapper.
|
virtual |
Retrieves the transparency mode for 32bpp formats.
Reimplemented in OdGiRasterImageDesc, OdGiRasterImageBGRA32, OdGiRasterImageHolder, OdGiRasterImageWrapper, and OdGiRasterImageAlphaChannelAdder.
|
virtual |
Retrieves the index of transparent color in the image.
Reimplemented in OdGiRasterImageHolder, OdGiRasterImageWrapper, and OdGiBitonalRasterTransformer.