152 for(
OdUInt32 i = 0; i < linesCount; ++i )
164 for(
OdUInt32 i = 0; i < linesCount; ++i )
265 const OdTrVisTexture *pBackTexture,
int antiAliasLevel = 1,
bool bSineCorrection =
false);
271 int antiAliasLevel = 1,
bool bSineCorrection =
false);
279 explicit ChannelMapping(
float redMap = 0.0f,
float greenMap = 0.0f,
float blueMap = 0.0,
float alphaMap = 0.0)
280 {
set(redMap, greenMap, blueMap, alphaMap); } };
325 bool bOwnExistBuffer =
false );
OdSmartPtr< OdTrVisTexture > OdTrVisTexturePtr
static void prepareTextureColors(TextureColor *colors, OdUInt32 size, const TextureColorContext &context)
virtual void endEditing()=0
virtual void beginEditing()=0
virtual const OdTrVisTexture * palette() const =0
virtual TextureColor getMaxValues() const =0
virtual void getColor(OdUInt32 nX, OdUInt32 nY, TextureColor &color) const =0
virtual void setScanline(OdUInt32 startLine, OdUInt32 linesCount, const TextureColor *pScanline)
virtual OdTrVisTexture * palette()=0
virtual void setColor(OdUInt32 nX, OdUInt32 nY, const TextureColor &color)=0
virtual TextureColor getMinValues() const
OdUInt32 getScanlineLength() const
virtual OdUInt32 subDivLimit() const =0
virtual OdUInt32 pixelSize() const =0
virtual bool isSmoothResampleSupported() const =0
virtual ~OdTrVisTexture()
virtual void getScanline(OdUInt32 startLine, OdUInt32 linesCount, TextureColor *pScanline) const
const OdUInt8 * textureData() const
virtual Format format() const =0
OdUInt32 getDataAlignment() const
virtual void setPalette(const OdTrVisTexture *pTexture)=0
virtual bool isFPImage() const =0
OdUInt32 getTextureHeight() const
OdUInt32 getTextureWidth() const
static bool save(const OdTrVisTexture *pTexture, const OdString &fileName)
static OdTrVisTexturePtr convert(OdTrVisTexture *pTextureTo, const OdTrVisTexture *pTextureFrom, Resampler method=kNearest)
static OdTrVisTexturePtr blur(const OdTrVisTexture *pTexture, OdUInt32 nSizeKernel=3, float fKernelMultiplier=1.0f)
static OdTrVisTexturePtr convertAndResample(OdTrVisTexture::Format fmt, Resampler method, OdUInt32 newWidth, OdUInt32 newHeight, const OdTrVisTexture *pTexture, OdUInt32 nNewAlign=0, const OdTrVisTexture *pPalette=NULL)
static OdTrVisTexturePtr createTextureFrom(OdTrVisTexture::Format fmt, OdUInt32 nWidth, OdUInt32 nHeight, OdUInt32 nAlign, OdTrVisTexture::Format bufferFmt, OdUInt32 bufferWidth, OdUInt32 bufferHeight, OdUInt32 bufferAlign, const void *buffer, Resampler method, const OdTrVisTexture *pPalette=NULL)
static OdTrVisTexturePtr mapChannels(const OdTrVisTexture *pTexture, const ChannelMapping &redMap=ChannelMapping(1.0f), const ChannelMapping &greenMap=ChannelMapping(0.0f, 1.0f), const ChannelMapping &blueMap=ChannelMapping(0.0f, 0.0f, 1.0f), const ChannelMapping &alphaMap=ChannelMapping(0.0f, 0.0f, 0.0f, 1.0f))
static OdTrVisTexturePtr createTextureFrom(OdTrVisTexture::Format fmt, OdUInt32 nWidth, OdUInt32 nHeight, OdUInt32 nAlign, const void *buffer, const OdTrVisTexture *pPalette=NULL, bool bOwnExistBuffer=false)
static void grayscaleTexture(OdTrVisTexture *pTexture, OdUInt32 nApplyComponent=7)
static void remapTextureChannels(OdTrVisTexture *pTexture, const ChannelMapping &redMap=ChannelMapping(1.0f), const ChannelMapping &greenMap=ChannelMapping(0.0f, 1.0f), const ChannelMapping &blueMap=ChannelMapping(0.0f, 0.0f, 1.0f), const ChannelMapping &alphaMap=ChannelMapping(0.0f, 0.0f, 0.0f, 1.0f))
static void blurTexture(OdTrVisTexture *pTexture, OdUInt32 nSizeKernel=3, float fKernelMultiplier=1.0f)
static bool pow2ResampleDimensions(OdUInt32 &nResultWidth, OdUInt32 &nResultHeight, OdUInt32 nInWidth, OdUInt32 nInHeight, bool bRequirePow2, OdUInt32 nMaxSize)
static void sphereMapTexture(OdTrVisTexture *pTexture, const OdTrVisTexture *pRightTexture, const OdTrVisTexture *pLeftTexture, const OdTrVisTexture *pTopTexture, const OdTrVisTexture *pBottomTexture, const OdTrVisTexture *pFrontTexture, const OdTrVisTexture *pBackTexture, int antiAliasLevel=1, bool bSineCorrection=false)
static OdTrVisTexturePtr createTexture(OdTrVisTexture::Format fmt, OdUInt32 nWidth, OdUInt32 nHeight, OdUInt32 nAlign=4)
static OdTrVisTexturePtr sphereMap(const OdTrVisTexture *pRightTexture, const OdTrVisTexture *pLeftTexture, const OdTrVisTexture *pTopTexture, const OdTrVisTexture *pBottomTexture, const OdTrVisTexture *pFrontTexture, const OdTrVisTexture *pBackTexture, int antiAliasLevel=1, bool bSineCorrection=false)
static OdTrVisTexturePtr grayscale(const OdTrVisTexture *pTexture, OdUInt32 nApplyComponent=7)
static OdTrVisTexturePtr negate(const OdTrVisTexture *pTexture)
static OdTrVisTexturePtr convert(OdTrVisTexture::Format fmt, const OdTrVisTexture *pTexture, OdUInt32 nNewAlign=0, const OdTrVisTexture *pPalette=NULL)
static OdTrVisTexturePtr createPow2TextureFrom(OdTrVisTexture::Format fmt, bool bRequirePow2, OdUInt32 nMaxSize, OdUInt32 nAlign, OdTrVisTexture::Format bufferFmt, OdUInt32 bufferWidth, OdUInt32 bufferHeight, OdUInt32 bufferAlign, const void *buffer, Resampler method, const OdTrVisTexture *pPalette=NULL)
static OdTrVisTexturePtr resamplePow2(Resampler method, bool bRequirePow2, const OdTrVisTexture *pTexture, OdUInt32 nMaxSize)
static OdTrVisTexturePtr resample(Resampler method, OdUInt32 newWidth, OdUInt32 newHeight, const OdTrVisTexture *pTexture)
static void negateTexture(OdTrVisTexture *pTexture)
static OdTrVisTexturePtr clone(const OdTrVisTexture *pTexture)
void prepareContext(const OdTrVisTexture *pSrc, const OdTrVisTexture *pDst)
ChannelMapping(float redMap=0.0f, float greenMap=0.0f, float blueMap=0.0, float alphaMap=0.0)
ChannelMapping & set(float redMap, float greenMap, float blueMap, float alphaMap)