24#ifndef _OD_ODGIRASTERIMAGE_H_
25#define _OD_ODGIRASTERIMAGE_H_
122 return 25.4 * 12.0 * 3.;
124 return 25.4 * 12.0 * 3. * 1760.;
126 return 25.4 * 0.000001;
130 return 1000.0 * 1.e-10;
144 return 1000. * 149597870700.;
146 return 1000. * 9460730472580800.;
148 return 1000. * 30856775814671900.;
160 kUndefinedSource = -1,
171 kFromImageBGRA32 = 11,
175 kFromPdfUnderlay = kFromOleObject,
186 kTransparencyDef = -1,
188 kTransparencyOff = 0,
190 kTransparency1Bit = 1,
192 kTransparency8Bit = 2
261 return bitsPerPixel == 24 &&
262 redOffset == 0 && greenOffset == 8 && blueOffset == 16 && numRedBits == 8 && numGreenBits == 8 && numBlueBits == 8;
291 return bitsPerPixel == 24 &&
292 redOffset == 16 && greenOffset == 8 && blueOffset == 0 && numRedBits == 8 && numGreenBits == 8 && numBlueBits == 8;
321 return bitsPerPixel == 16 &&
322 redOffset == 10 && greenOffset == 5 && blueOffset == 0 && numRedBits == 5 && numGreenBits == 5 && numBlueBits == 5;
351 return bitsPerPixel == 32 && alphaOffset == 24 && numAlphaBits == 8 &&
352 redOffset == 0 && greenOffset == 8 && blueOffset == 16 && numRedBits == 8 && numGreenBits == 8 && numBlueBits == 8;
383 return bitsPerPixel == 32 && alphaOffset == 24 && numAlphaBits == 8 &&
384 redOffset == 16 && greenOffset == 8 && blueOffset == 0 && numRedBits == 8 && numGreenBits == 8 && numBlueBits == 8;
660 double brightness = 50.0,
double contrast = 50.0,
double fade = 0.0,
ODCOLORREF backgroundColor = 0,
661 bool flipX =
false,
bool flipY =
false,
bool rotate90 =
false,
663 bool transparency =
false)
const;
689 virtual void *
imp()
const;
720 kImageSource = (1 << 0),
722 kTransparencyMode = (1 << 1),
724 kSourceFileName = (1 << 2)
#define ODA_ASSERT_ONCE(exp)
OdSmartPtr< OdGiRasterImage > OdGiRasterImagePtr
OdSmartPtr< OdGiRasterImageParam > OdGiRasterImageParamPtr
bool operator==(T left, const OdGiVariant::EnumType right)
OdSmartPtr< OdGiRasterImage > changeImageSource(ImageSource source, const OdChar *pFileName=NULL)
OdSmartPtr< OdGiRasterImage > changeSourceFileName(const OdString &fileName)
virtual Units defaultResolution(double &xPelsPerUnit, double &yPelsPerUnit) const
virtual PixelFormatInfo pixelFormat() const =0
virtual OdUInt32 scanLineSize() const
virtual TransparencyMode transparencyMode() const
virtual ODCOLORREF color(OdUInt32 colorIndex) const =0
static OdUInt32 calcBMPScanLineSize(OdUInt32 pixelWidth, int colorDepth)
virtual OdUInt32 pixelHeight() const =0
virtual OdUInt32 scanLinesAlignment() const =0
ODRX_DECLARE_MEMBERS(OdGiRasterImage)
virtual const OdUInt8 * scanLines() const =0
virtual OdUInt32 paletteDataSize() const =0
virtual void paletteData(OdUInt8 *bytes) const =0
virtual void scanLines(OdUInt8 *scnLines, OdUInt32 firstScanline, OdUInt32 numLines=1) const =0
static double millimetersInUnit(Units units)
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 OdUInt32 colorDepth() const =0
static OdUInt32 calcColorMask(OdUInt8 numColorBits, OdUInt8 colorOffset=0)
virtual ImageSource imageSource() const
OdSmartPtr< OdGiRasterImage > changeTransparencyMode(TransparencyMode mode)
virtual OdUInt32 numColors() const =0
virtual void * imp() const
virtual OdUInt32 pixelWidth() const =0
virtual OdSmartPtr< OdGiRasterImage > crop(OdUInt32 x, OdUInt32 y, OdUInt32 width, OdUInt32 height) const
virtual int transparentColor() const
virtual const OdString & sourceFileName() const
virtual void setImageSource(ImageSource source)
virtual void setSourceFileName(const OdString &fileName)
ODRX_DECLARE_MEMBERS(OdGiRasterImageParam)
virtual OdUInt32 supportedParams() const =0
virtual void setTransparencyMode(TransparencyMode mode)
GLint GLenum GLsizei width
GLsizei GLsizei GLchar * source
GLint GLenum GLsizei GLsizei height