31Color BMCOL(sal_uInt32 _col) {
50 bool isLegalBitsPerPixel(sal_uInt32 nBitsPerPixel)
52 switch (nBitsPerPixel)
94 std::vector<Color> palette(2);
105 for (
nx = 0; --nxC;
nx++ ) {
110 SAL_WARN(
"filter.icgm",
"buffer is too small");
125 for (
nx = 0; --nxC;
nx++ ) {
130 SAL_WARN(
"filter.icgm",
"buffer is too small");
145 for (
nx = 0; --nxC;
nx++ ) {
149 SAL_WARN(
"filter.icgm",
"buffer is too small");
172 for (
nx = 0; --nxC;
nx++ ) {
176 SAL_WARN(
"filter.icgm",
"buffer is too small");
192 for (
nx = 0; --nxC;
nx++ ) {
196 SAL_WARN(
"filter.icgm",
"buffer is too small");
201 aBitmapColor.
SetRed( *pTemp++ );
203 aBitmapColor.
SetBlue( *pTemp++ );
215 double nX = rDesc.
mnR.
X - rDesc.
mnQ.
X;
216 double nY = rDesc.
mnR.
Y - rDesc.
mnQ.
Y;
218 rDesc.
mndy = std::hypot(nX, nY);
223 rDesc.
mndx = std::hypot(nX, nY);
228 double fSqrt = std::hypot(nX, nY);
237 double fSin = sin(fAngle);
238 double fCos = cos(fAngle);
239 nX = fCos * nX + fSin * nY;
240 nY = -( fSin * nX - fCos * nY );
242 fSqrt = std::hypot(nX, nY);
245 fAngle = 360 - fAngle;
247 if ( fAngle > 180 ) {
256 catch (
const std::bad_alloc&)
264 sal_uInt16 nColors = sal::static_int_cast< sal_uInt16 >(
266 std::vector<Color> palette( nColors );
267 for ( sal_uInt16
i = 0;
i < nColors;
i++ )
327 if ( !( rDesc.
mnX || rDesc.
mnY ) )
332 sal_uInt32 nWidthBits;
341 sal_uInt32 nScanSize;
383 SAL_WARN(
"filter.icgm",
"bitmap would expand too much");
389 SAL_WARN(
"filter.icgm",
"too many inserts");
403 aFloatPoint.
X = rSource.
mnQ.
X - rSource.
mnR.
X;
404 aFloatPoint.
Y = rSource.
mnQ.
Y - rSource.
mnR.
Y;
405 rDest.
mnQ.
X += aFloatPoint.
X;
406 rDest.
mnQ.
Y += aFloatPoint.
Y;
423 std::unique_ptr<CGMBitmap> xCGMTempBitmap;
434 xCGMTempBitmap.reset();
435 return xCGMTempBitmap;
440 return xCGMTempBitmap;
#define ASF_FILLINTERIORSTYLE
void Expand(sal_Int32 nDX, sal_Int32 nDY, bool bExpandTransparent=false)
bool CopyPixel(const tools::Rectangle &rRectDst, const tools::Rectangle &rRectSrc, const BitmapEx *pBmpExSrc)
const Size & GetSizePixel() const
sal_uInt32 mnCompressionMode
sal_uInt32 mnDstBitsPerPixel
tools::Long mnLocalColorPrecision
std::unique_ptr< CGMBitmap > GetNext()
std::vector< Color > ImplGeneratePalette(CGMBitmapDescriptor const &)
void ImplGetBitmap(CGMBitmapDescriptor &)
void ImplInsert(CGMBitmapDescriptor const &rSource, CGMBitmapDescriptor &rDest)
std::unique_ptr< CGMBitmapDescriptor > pCGMBitmapDescriptor
bool ImplGetDimensions(CGMBitmapDescriptor &)
sal_Int32 ImplGetI(sal_uInt32 nPrecision)
void ImplGetPoint(FloatPoint &rFloatPoint, bool bMap=false)
sal_uInt8 * mpEndValidSource
sal_uInt32 ImplGetUI(sal_uInt32 nPrecision)
std::unique_ptr< CGMElements > pElement
sal_uInt32 ImplGetPointSize()
void SetGreen(sal_uInt8 nGreen)
void SetRed(sal_uInt8 nRed)
void SetBlue(sal_uInt8 nBlue)
constexpr tools::Long Height() const
void SetPixel(tools::Long nY, tools::Long nX, Color nColor)
#define SAL_WARN(area, stream)
constexpr double rad2deg(double v)
constexpr double deg2rad(double v)
std::enable_if< std::is_signed< T >::value, bool >::type checked_multiply(T a, T b, T &result)
BitmapEx CreateFromData(sal_uInt8 const *pData, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int32 nStride, sal_Int8 nBitCount, bool bReversColors, bool bReverseAlpha)