53 const bool bHMirr(
getGraphicAttr().GetMirrorFlags() & BmpMirrorFlags::Horizontal);
54 const bool bVMirr(
getGraphicAttr().GetMirrorFlags() & BmpMirrorFlags::Vertical);
60 aTransform.
translate(bHMirr ? 1.0 : 0.0, bVMirr ? 1.0 : 0.0);
71 aSuppressGraphicAttr.
SetCrop(0, 0, 0, 0);
78 const bool isBitmap(GraphicType::Bitmap == aTransformedGraphic.
GetType()
81 const bool isDrawMode(GraphicDrawMode::Standard !=
getGraphicAttr().GetDrawMode());
83 if (isBitmap && (isAdjusted || isDrawMode))
113 if (isAdjusted || isDrawMode)
118 std::move(aRetval), aSuppressGraphicAttr.
GetDrawMode(),
119 std::clamp(aSuppressGraphicAttr.
GetLuminance() * 0.01, -1.0, 1.0),
120 std::clamp(aSuppressGraphicAttr.
GetContrast() * 0.01, -1.0, 1.0),
121 std::clamp(aSuppressGraphicAttr.
GetChannelR() * 0.01, -1.0, 1.0),
122 std::clamp(aSuppressGraphicAttr.
GetChannelG() * 0.01, -1.0, 1.0),
123 std::clamp(aSuppressGraphicAttr.
GetChannelB() * 0.01, -1.0, 1.0),
124 std::clamp(aSuppressGraphicAttr.
GetGamma(), 0.0, 10.0),
137 const double fTransparency(
138 std::clamp((255 -
getGraphicAttr().GetAlpha()) * (1.0 / 255.0), 0.0, 1.0));
171 rContainer.
append(std::move(aRetval));
178 , maGraphicObject(rGraphicObject)
179 , maGraphicAttr(rGraphicAttr)
186 , maGraphicObject(rGraphicObject)
192 if (BufferedDecompositionPrimitive2D::operator==(rPrimitive))
short GetContrast() const
short GetChannelB() const
void SetRotation(Degree10 nRotate10)
void SetMirrorFlags(BmpMirrorFlags nMirrFlags)
GraphicDrawMode GetDrawMode() const
short GetChannelG() const
short GetChannelR() const
void SetCrop(tools::Long nLeft_100TH_MM, tools::Long nTop_100TH_MM, tools::Long nRight_100TH_MM, tools::Long nBottom_100TH_MM)
void SetAlpha(sal_uInt8 cAlpha)
short GetLuminance() const
basegfx::B2DVector calculateCropScaling(double fWidth, double fHeight, double fLeftCrop, double fTopCrop, double fRightCrop, double fBottomCrop) const
const Graphic & GetGraphic() const
Graphic GetTransformedGraphic(const Size &rDestSize, const MapMode &rDestMap, const GraphicAttr &rAttr) const
GraphicType GetType() const
const std::shared_ptr< VectorGraphicData > & getVectorGraphicData() const
void translate(double fX, double fY)
BASEGFX_DLLPUBLIC void transform(const B2DHomMatrix &rMatrix)
GraphicPrimitive2D class.
const basegfx::B2DHomMatrix & getTransform() const
data read access
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D &rViewInformation) const override
get range
virtual void create2DDecomposition(Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const override
local decomposition
virtual sal_uInt32 getPrimitive2DID() const override
provide unique ID
const GraphicAttr & getGraphicAttr() const
GraphicPrimitive2D(basegfx::B2DHomMatrix aTransform, const GraphicObject &rGraphicObject, const GraphicAttr &rGraphicAttr)
constructor(s)
const GraphicObject & getGraphicObject() const
virtual bool operator==(const BasePrimitive2D &rPrimitive) const override
compare operator
void append(const Primitive2DReference &)
UnifiedTransparencePrimitive2D class.
#define PRIMITIVE2D_ID_GRAPHICPRIMITIVE2D
basegfx::B2DHomMatrix maTransform
the geometric definition
B2DHomMatrix createScaleB2DHomMatrix(double fScaleX, double fScaleY)
void create2DDecompositionOfGraphic(Primitive2DContainer &rContainer, const Graphic &rGraphic, const basegfx::B2DHomMatrix &rTransform)
Helper method with supports decomposing a Graphic with all possible contents to lower level primitive...
Primitive2DContainer create2DColorModifierEmbeddingsAsNeeded(Primitive2DContainer &&rChildren, GraphicDrawMode aGraphicDrawMode, double fLuminance, double fContrast, double fRed, double fGreen, double fBlue, double fGamma, bool bInvert)
Helper to embed given sequence of primitives to evtl.