29#include <osl/diagnose.h>
36 : maSingleColor(rSingleColor),
64 : maBitmapEx(rBitmapEx),
65 maTopLeft(rRange.getMinimum()),
69 mbIsAlpha(maBitmapEx.IsAlpha())
110 OSL_ENSURE(
mpReadTransparence,
"OOps, transparence type Bitmap, but no read access created in the constructor (?)");
123 if(rX >= 0 && rX < mpReadBitmap->
Width())
127 return (rY >= 0 && rY < mpReadBitmap->
Height());
140 const double fConvertColor(1.0 / 255.0);
143 static_cast<double>(aBMCol.GetRed()) * fConvertColor,
144 static_cast<double>(aBMCol.GetGreen()) * fConvertColor,
145 static_cast<double>(aBMCol.GetBlue()) * fConvertColor);
154 rfOpacity = (
static_cast<double>(0xff - aLuminance) * (1.0 / 255.0));
177 const double fNewOpacity(
static_cast<double>(0xff - aLuminance) * (1.0 / 255.0));
179 rfOpacity = 1.0 - ((1.0 - fNewOpacity) * (1.0 - rfOpacity));
185 const Color aColor(aBMCol.GetRed(), aBMCol.GetGreen(), aBMCol.GetBlue());
187 rfOpacity = (
static_cast<double>(0xff - aColor.
GetLuminance()) * (1.0 / 255.0));
204 const sal_Int32 nCol(
static_cast< sal_Int32
>((fY < 0.0 ?
maSize.
getY() -fY : fY) /
maSize.
getY()));
213 const sal_Int32 nRow(
static_cast< sal_Int32
>((fX < 0.0 ?
maSize.
getX() -fX : fX) /
maSize.
getX()));
243 mfOffsetX(
std::clamp(fOffsetX, 0.0, 1.0)),
244 mfOffsetY(
std::clamp(fOffsetY, 0.0, 1.0)),
269 double fLogicPixelSize)
270 : mfLogicPixelSize(fLogicPixelSize)
274 const double fAngleA(rHatch.
getAngle());
geometry::RealSize2D maSize
Bitmap const & GetBitmap() const
sal_uInt8 GetIndex() const
const AlphaMask & GetAlphaMask() const
Bitmap GetBitmap(Color aTransparentReplaceColor) const
vcl::ScopedBitmapAccess< BitmapReadAccess, Bitmap, &Bitmap::AcquireReadAccess > ScopedReadAccess
sal_uInt8 GetLuminance() const
double getDistance() const
bool isFillBackground() const
const basegfx::BColor & getColor() const
HatchStyle getStyle() const
HatchTexturePrimitive3D class.
const attribute::FillHatchAttribute & getHatch() const
data read access
const basegfx::B2DVector & getTextureSize() const
data read access
basegfx::B2DPoint impGetCorrected(const basegfx::B2DPoint &rUV) const
virtual void modifyOpacity(const basegfx::B2DPoint &rUV, double &rfOpacity) const override
GeoTexSvxBitmapExTiled(const BitmapEx &rBitmapEx, const basegfx::B2DRange &rRange, double fOffsetX, double fOffsetY)
virtual void modifyBColor(const basegfx::B2DPoint &rUV, basegfx::BColor &rBColor, double &rfOpacity) const override
sal_uInt8 impGetTransparence(sal_Int32 rX, sal_Int32 rY) const
bool impIsValid(const basegfx::B2DPoint &rUV, sal_Int32 &rX, sal_Int32 &rY) const
virtual void modifyBColor(const basegfx::B2DPoint &rUV, basegfx::BColor &rBColor, double &rfOpacity) const override
GeoTexSvxBitmapEx(const BitmapEx &rBitmapEx, const basegfx::B2DRange &rRange)
basegfx::B2DPoint maTopLeft
Bitmap::ScopedReadAccess mpReadBitmap
Bitmap::ScopedReadAccess mpReadTransparence
basegfx::B2DVector maSize
virtual void modifyOpacity(const basegfx::B2DPoint &rUV, double &rfOpacity) const override
virtual ~GeoTexSvxBitmapEx() override
virtual void modifyBColor(const basegfx::B2DPoint &rUV, basegfx::BColor &rBColor, double &rfOpacity) const override
virtual void modifyOpacity(const basegfx::B2DPoint &rUV, double &rfOpacity) const override
basegfx::BColor maSingleColor
GeoTexSvxMono(const basegfx::BColor &rSingleColor, double fOpacity)
virtual bool operator==(const GeoTexSvx &rGeoTexSvx) const override
virtual void modifyBColor(const basegfx::B2DPoint &rUV, basegfx::BColor &rBColor, double &rfOpacity) const override
virtual ~GeoTexSvxMultiHatch() override
GeoTexSvxMultiHatch(const primitive3d::HatchTexturePrimitive3D &rPrimitive, double fLogicPixelSize)
std::unique_ptr< GeoTexSvxHatch > mp2
std::unique_ptr< GeoTexSvxHatch > mp1
std::unique_ptr< GeoTexSvxHatch > mp0
bool impIsOnHatch(const basegfx::B2DPoint &rUV) const
virtual void modifyOpacity(const basegfx::B2DPoint &rUV, double &rfOpacity) const override
#define SAL_WARN_IF(condition, area, stream)
B2DRange getRange(const B2DPolygon &rCandidate)
bool convertBitmap32To24Plus8(BitmapEx const &rInput, BitmapEx &rResult)