discretebitmapprimitive2d.cxx (464702f4) discretebitmapprimitive2d.cxx (e38dead8)
1/**************************************************************
1/**************************************************************
2 *
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
9 * with the License. You may obtain a copy of the License at
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
9 * with the License. You may obtain a copy of the License at
10 *
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
19 *
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_drawinglayer.hxx"
26
27#include <drawinglayer/primitive2d/discretebitmapprimitive2d.hxx>
28#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
29#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
30
31//////////////////////////////////////////////////////////////////////////////
32
33namespace drawinglayer
34{
35 namespace primitive2d
36 {
37 Primitive2DSequence DiscreteBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
38 {
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_drawinglayer.hxx"
26
27#include <drawinglayer/primitive2d/discretebitmapprimitive2d.hxx>
28#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
29#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
30
31//////////////////////////////////////////////////////////////////////////////
32
33namespace drawinglayer
34{
35 namespace primitive2d
36 {
37 Primitive2DSequence DiscreteBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const
38 {
39 // use getViewTransformation() and getObjectTransformation() from
40 // ObjectAndViewTransformationDependentPrimitive2D to create a BitmapPrimitive2D
39 // use getViewTransformation() and getObjectTransformation() from
40 // ObjectAndViewTransformationDependentPrimitive2D to create a BitmapPrimitive2D
41 // with the correct mapping
42 Primitive2DSequence xRetval;
43
44 if(!getBitmapEx().IsEmpty())
45 {
46 // get discrete size
47 const Size& rSizePixel = getBitmapEx().GetSizePixel();
48 const basegfx::B2DVector aDiscreteSize(rSizePixel.Width(), rSizePixel.Height());

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

76 const Primitive2DReference xRef(new BitmapPrimitive2D(getBitmapEx(), aObjectTransform));
77 xRetval = Primitive2DSequence(&xRef, 1);
78 }
79
80 return xRetval;
81 }
82
83 DiscreteBitmapPrimitive2D::DiscreteBitmapPrimitive2D(
41 // with the correct mapping
42 Primitive2DSequence xRetval;
43
44 if(!getBitmapEx().IsEmpty())
45 {
46 // get discrete size
47 const Size& rSizePixel = getBitmapEx().GetSizePixel();
48 const basegfx::B2DVector aDiscreteSize(rSizePixel.Width(), rSizePixel.Height());

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

76 const Primitive2DReference xRef(new BitmapPrimitive2D(getBitmapEx(), aObjectTransform));
77 xRetval = Primitive2DSequence(&xRef, 1);
78 }
79
80 return xRetval;
81 }
82
83 DiscreteBitmapPrimitive2D::DiscreteBitmapPrimitive2D(
84 const BitmapEx& rBitmapEx,
84 const BitmapEx& rBitmapEx,
85 const basegfx::B2DPoint& rTopLeft)
86 : ObjectAndViewTransformationDependentPrimitive2D(),
87 maBitmapEx(rBitmapEx),
88 maTopLeft(rTopLeft)
89 {
90 }
91
92 bool DiscreteBitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const

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

103 }
104
105 // provide unique ID
106 ImplPrimitrive2DIDBlock(DiscreteBitmapPrimitive2D, PRIMITIVE2D_ID_DISCRETEBITMAPPRIMITIVE2D)
107
108 } // end of namespace primitive2d
109} // end of namespace drawinglayer
110
85 const basegfx::B2DPoint& rTopLeft)
86 : ObjectAndViewTransformationDependentPrimitive2D(),
87 maBitmapEx(rBitmapEx),
88 maTopLeft(rTopLeft)
89 {
90 }
91
92 bool DiscreteBitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const

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

103 }
104
105 // provide unique ID
106 ImplPrimitrive2DIDBlock(DiscreteBitmapPrimitive2D, PRIMITIVE2D_ID_DISCRETEBITMAPPRIMITIVE2D)
107
108 } // end of namespace primitive2d
109} // end of namespace drawinglayer
110
111//////////////////////////////////////////////////////////////////////////////
112// eof
111/* vim: set noet sw=4 ts=4: */