summaryrefslogtreecommitdiff
path: root/include/drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx')
-rw-r--r--include/drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx b/include/drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx
index f364ba7f19db..0b0e2ee4dbf2 100644
--- a/include/drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx
+++ b/include/drawinglayer/primitive2d/PolyPolygonGraphicPrimitive2D.hxx
@@ -32,6 +32,10 @@ namespace drawinglayer::primitive2d
This primitive defines a tools::PolyPolygon filled with bitmap data
(including transparence). The decomosition will create a MaskPrimitive2D
containing a FillGraphicPrimitive2D.
+
+ SDPR: support alpha now directly: the decompositon creates
+ FillGraphicPrimitive2D which also supports alpha directly
+ now. All direct usages are covered
*/
class DRAWINGLAYER_DLLPUBLIC PolyPolygonGraphicPrimitive2D final
: public BufferedDecompositionPrimitive2D
@@ -46,6 +50,9 @@ private:
/// the bitmap fill definition (may include tiling)
attribute::FillGraphicAttribute maFillGraphic;
+ /// the transparency in range [0.0 .. 1.0]
+ double mfTransparency;
+
/// local decomposition.
virtual Primitive2DReference
create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const override;
@@ -53,12 +60,15 @@ private:
public:
PolyPolygonGraphicPrimitive2D(basegfx::B2DPolyPolygon aPolyPolygon,
const basegfx::B2DRange& rDefinitionRange,
- const attribute::FillGraphicAttribute& rFillGraphic);
+ const attribute::FillGraphicAttribute& rFillGraphic,
+ double fTransparency = 0.0);
/// data read access
const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
const basegfx::B2DRange& getDefinitionRange() const { return maDefinitionRange; }
const attribute::FillGraphicAttribute& getFillGraphic() const { return maFillGraphic; }
+ double getTransparency() const { return mfTransparency; }
+ bool hasTransparency() const { return !basegfx::fTools::equalZero(mfTransparency); }
/// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;