CFx SDK Documentation  2023 SP0
Public Member Functions | List of all members
CFxRasterImage Class Referenceabstract

#include <FxRasterImage.h>

Inheritance diagram for CFxRasterImage:
OdGiRasterImageParam OdGiRasterImage OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (CFxRasterImage)
 
virtual ~CFxRasterImage ()
 
virtual bool Create (int iWitdh, int iHeight, int iBPP, const ODCOLORREF *pPalette)=0
 
virtual bool CreateFromBuffer (OdUInt8Array &buffer, int width, int height, int bpp)=0
 
virtual bool CreateFromBuffer (OdUInt8Array &buffer, int width, int height, QImage::Format format)=0
 
virtual bool Create (int width, int height, const OdGiSelfGdiDrawable *pDrawable, const QRect &rect, const OdGiCommonDraw &commonDraw, void *phdc)=0
 
virtual bool CreateFromSlide (int width, int height, const CFxString &name)=0
 
virtual bool CreateFromQImage (const QImage &qImage, OdUInt32 scanLinesAlignment)=0
 
virtual bool CreateFromStream (const uchar *pBuffer, int size)=0
 
virtual bool CreateFromFile (const QString &fileName)=0
 
virtual bool WriteFile (const QString &fileName)=0
 
virtual const QImage & GetImage () const =0
 
virtual QImage & GetImage ()=0
 
virtual void Clear ()=0
 
virtual void ShrinkMemory ()=0
 
- 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
 

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
 
- 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 ()
 

Detailed Description

Description: Class for raster images processing. Library: DDKERNEL

Definition at line 43 of file FxRasterImage.h.

Constructor & Destructor Documentation

◆ ~CFxRasterImage()

virtual CFxRasterImage::~CFxRasterImage ( )
virtual

Destructor.

Member Function Documentation

◆ Clear()

virtual void CFxRasterImage::Clear ( )
pure virtual

Clears image data.

◆ Create() [1/2]

virtual bool CFxRasterImage::Create ( int  iWitdh,
int  iHeight,
int  iBPP,
const ODCOLORREF pPalette 
)
pure virtual

Creates an empty image with specified width, height and bits per pixel parameters.

◆ Create() [2/2]

virtual bool CFxRasterImage::Create ( int  width,
int  height,
const OdGiSelfGdiDrawable pDrawable,
const QRect &  rect,
const OdGiCommonDraw commonDraw,
void phdc 
)
pure virtual

Description: Creates raster with OLE object. Or draws OLE into 'hdc' if it's provided. Returns false if image is not created.

Arguments:

Parameters
pRasterpointer to the image
widthWidth of a new raster
heightHeight of a new raster
pDrawable
rectSize of the drawable object
commonDraw

◆ CreateFromBuffer() [1/2]

virtual bool CFxRasterImage::CreateFromBuffer ( OdUInt8Array buffer,
int  width,
int  height,
int  bpp 
)
pure virtual

Description: Creates raster image from buffer. Currently only 32 and 24 bpp are supported.

◆ CreateFromBuffer() [2/2]

virtual bool CFxRasterImage::CreateFromBuffer ( OdUInt8Array buffer,
int  width,
int  height,
QImage::Format  format 
)
pure virtual

◆ CreateFromFile()

virtual bool CFxRasterImage::CreateFromFile ( const QString &  fileName)
pure virtual

Creates an image from path to image file.

◆ CreateFromQImage()

virtual bool CFxRasterImage::CreateFromQImage ( const QImage &  qImage,
OdUInt32  scanLinesAlignment 
)
pure virtual

◆ CreateFromSlide()

virtual bool CFxRasterImage::CreateFromSlide ( int  width,
int  height,
const CFxString name 
)
pure virtual

Description: Creates reaster with OLE object.

Arguments:

Parameters
pRasterpointer to the image
widthWidth of a new raster
heightHeight of a new raster
nameName of the slide file

◆ CreateFromStream()

virtual bool CFxRasterImage::CreateFromStream ( const uchar pBuffer,
int  size 
)
pure virtual

Creates an image by stream from memory.

◆ GetImage() [1/2]

virtual const QImage& CFxRasterImage::GetImage ( ) const
pure virtual

Returns image data.

◆ GetImage() [2/2]

virtual QImage& CFxRasterImage::GetImage ( )
pure virtual

Returns image data.

◆ ODRX_DECLARE_MEMBERS()

CFxRasterImage::ODRX_DECLARE_MEMBERS ( CFxRasterImage  )

◆ ShrinkMemory()

virtual void CFxRasterImage::ShrinkMemory ( )
pure virtual

reduce memory size.

◆ WriteFile()

virtual bool CFxRasterImage::WriteFile ( const QString &  fileName)
pure virtual

Writes image to file with specified filename.


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