summaryrefslogtreecommitdiff
path: root/include/drawinglayer
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-11-05 16:13:12 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-11-06 11:46:04 +0000
commitf120005ea41d59caf4b7d7f6017f3549d25b4287 (patch)
tree10fffb159ac615a2c3e8cdcd2c356c60cb0d61d3 /include/drawinglayer
parent3476768dc52dac9ed10a204ffcf000cd042d8993 (diff)
Resolves: #i123500# redefined ColorModifiers and ColorModifierStack...
redefined GraphicAttr to be expressed as primitives if needed, enhanced render and export quality if graphic is modified using graphic attributes (cherry picked from commit 1e79e8da3f8042f7d7bd94b2c9f03cff7545b05c) Conflicts: basegfx/inc/basegfx/color/bcolor.hxx basegfx/inc/basegfx/color/bcolormodifier.hxx basegfx/source/color/bcolormodifier.cxx drawinglayer/inc/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx drawinglayer/inc/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx drawinglayer/inc/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx drawinglayer/source/primitive2d/graphicprimitive2d.cxx drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx drawinglayer/source/primitive3d/modifiedcolorprimitive3d.cxx Change-Id: Ief2172efc9cc1b9838de48ec7f536c05573c7dc3
Diffstat (limited to 'include/drawinglayer')
-rw-r--r--include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx17
-rw-r--r--include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx10
-rw-r--r--include/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx6
3 files changed, 26 insertions, 7 deletions
diff --git a/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx b/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx
index 9755a2dd21de..00e11b3c412e 100644
--- a/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx
+++ b/include/drawinglayer/primitive2d/graphicprimitivehelper2d.hxx
@@ -21,6 +21,7 @@
#include <drawinglayer/drawinglayerdllapi.h>
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+#include <svtools/grfmgr.hxx>
//////////////////////////////////////////////////////////////////////////////
// predefines
@@ -44,6 +45,22 @@ namespace drawinglayer
Primitive2DSequence create2DDecompositionOfGraphic(
const Graphic& rGraphic,
const basegfx::B2DHomMatrix& rTransform);
+
+ /** Helper to embed given sequence of primitives to evtl. a stack
+ of ModifiedColorPrimitive2D's to get all the needed modifications
+ applied.
+ */
+ Primitive2DSequence create2DColorModifierEmbeddingsAsNeeded(
+ const Primitive2DSequence& rChildren,
+ GraphicDrawMode aGraphicDrawMode = GRAPHICDRAWMODE_STANDARD,
+ double fLuminance = 0.0, // [-1.0 .. 1.0]
+ double fContrast = 0.0, // [-1.0 .. 1.0]
+ double fRed = 0.0, // [-1.0 .. 1.0]
+ double fGreen = 0.0, // [-1.0 .. 1.0]
+ double fBlue = 0.0, // [-1.0 .. 1.0]
+ double fGamma = 1.0, // ]0.0 .. 10.0]
+ bool bInvert = false);
+
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx b/include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx
index 4dc0371d23c8..6f68a89fcbc5 100644
--- a/include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+
+
#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_MODIFIEDCOLORPRIMITIVE2D_HXX
#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_MODIFIEDCOLORPRIMITIVE2D_HXX
@@ -42,7 +44,7 @@ namespace drawinglayer
For the possibilities of color modifications, please refer
to the basegfx::BColorModifier definitions in basegfx. For
processing there is tooling in basegfx to build a stack of
- BColorModifiers to always be able to proccess the correct
+ BColorModifierSharedPtrs to always be able to proccess the correct
colors.
If a renderer does not handle this primitive, the content will
@@ -52,16 +54,16 @@ namespace drawinglayer
{
private:
/// The ColorModifier to use
- basegfx::BColorModifier maColorModifier;
+ basegfx::BColorModifierSharedPtr maColorModifier;
public:
/// constructor
ModifiedColorPrimitive2D(
const Primitive2DSequence& rChildren,
- const basegfx::BColorModifier& rColorModifier);
+ const basegfx::BColorModifierSharedPtr& rColorModifier);
/// data read access
- const basegfx::BColorModifier& getColorModifier() const { return maColorModifier; }
+ const basegfx::BColorModifierSharedPtr& getColorModifier() const { return maColorModifier; }
/// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
diff --git a/include/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx b/include/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx
index f791213160aa..c07aa21169cf 100644
--- a/include/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx
+++ b/include/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx
@@ -42,16 +42,16 @@ namespace drawinglayer
{
private:
/// The ColorModifier to use
- basegfx::BColorModifier maColorModifier;
+ basegfx::BColorModifierSharedPtr maColorModifier;
public:
/// constructor
ModifiedColorPrimitive3D(
const Primitive3DSequence& rChildren,
- const basegfx::BColorModifier& rColorModifier);
+ const basegfx::BColorModifierSharedPtr& rColorModifier);
/// data read access
- const basegfx::BColorModifier& getColorModifier() const { return maColorModifier; }
+ const basegfx::BColorModifierSharedPtr& getColorModifier() const { return maColorModifier; }
/// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;