shadowprimitive2d.cxx (464702f4) shadowprimitive2d.cxx (49c58f9b)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 63 unchanged lines hidden (view full) ---

72 aRetval.transform(getShadowTransform());
73 return aRetval;
74 }
75
76 Primitive2DSequence ShadowPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
77 {
78 Primitive2DSequence aRetval;
79
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 63 unchanged lines hidden (view full) ---

72 aRetval.transform(getShadowTransform());
73 return aRetval;
74 }
75
76 Primitive2DSequence ShadowPrimitive2D::get2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
77 {
78 Primitive2DSequence aRetval;
79
80 if(getChildren().hasElements())
81 {
82 // create a modifiedColorPrimitive containing the shadow color and the content
83 const basegfx::BColorModifier aBColorModifier(getShadowColor());
84 const Primitive2DReference xRefA(new ModifiedColorPrimitive2D(getChildren(), aBColorModifier));
85 const Primitive2DSequence aSequenceB(&xRefA, 1L);
80 if(getChildren().hasElements())
81 {
82 // create a modifiedColorPrimitive containing the shadow color and the content
83 const basegfx::BColorModifierSharedPtr aBColorModifier(
84 new basegfx::BColorModifier_replace(
85 getShadowColor()));
86 const Primitive2DReference xRefA(
87 new ModifiedColorPrimitive2D(
88 getChildren(),
89 aBColorModifier));
90 const Primitive2DSequence aSequenceB(&xRefA, 1L);
86
91
87 // build transformed primitiveVector with shadow offset and add to target
88 const Primitive2DReference xRefB(new TransformPrimitive2D(getShadowTransform(), aSequenceB));
89 aRetval = Primitive2DSequence(&xRefB, 1L);
90 }
92 // build transformed primitiveVector with shadow offset and add to target
93 const Primitive2DReference xRefB(new TransformPrimitive2D(getShadowTransform(), aSequenceB));
94 aRetval = Primitive2DSequence(&xRefB, 1L);
95 }
91
92 return aRetval;
93 }
94
95 // provide unique ID
96 ImplPrimitrive2DIDBlock(ShadowPrimitive2D, PRIMITIVE2D_ID_SHADOWPRIMITIVE2D)
97
98 } // end of namespace primitive2d
99} // end of namespace drawinglayer
100
101//////////////////////////////////////////////////////////////////////////////
102// eof
96
97 return aRetval;
98 }
99
100 // provide unique ID
101 ImplPrimitrive2DIDBlock(ShadowPrimitive2D, PRIMITIVE2D_ID_SHADOWPRIMITIVE2D)
102
103 } // end of namespace primitive2d
104} // end of namespace drawinglayer
105
106//////////////////////////////////////////////////////////////////////////////
107// eof