overlayanimatedbitmapex.cxx (1cd65da9) overlayanimatedbitmapex.cxx (414a0e15)
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

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

40 {
41 if(mbOverlayState)
42 {
43 const drawinglayer::primitive2d::Primitive2DReference aPrimitive(
44 new drawinglayer::primitive2d::OverlayBitmapExPrimitive(
45 getBitmapEx1(),
46 getBasePosition(),
47 getCenterX1(),
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

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

40 {
41 if(mbOverlayState)
42 {
43 const drawinglayer::primitive2d::Primitive2DReference aPrimitive(
44 new drawinglayer::primitive2d::OverlayBitmapExPrimitive(
45 getBitmapEx1(),
46 getBasePosition(),
47 getCenterX1(),
48 getCenterY1()));
48 getCenterY1(),
49 getShearX(),
50 getRotation()));
49
50 return drawinglayer::primitive2d::Primitive2DSequence(&aPrimitive, 1);
51 }
52 else
53 {
54 const drawinglayer::primitive2d::Primitive2DReference aPrimitive(
55 new drawinglayer::primitive2d::OverlayBitmapExPrimitive(
56 getBitmapEx2(),
57 getBasePosition(),
58 getCenterX2(),
51
52 return drawinglayer::primitive2d::Primitive2DSequence(&aPrimitive, 1);
53 }
54 else
55 {
56 const drawinglayer::primitive2d::Primitive2DReference aPrimitive(
57 new drawinglayer::primitive2d::OverlayBitmapExPrimitive(
58 getBitmapEx2(),
59 getBasePosition(),
60 getCenterX2(),
59 getCenterY2()));
61 getCenterY2(),
62 getShearX(),
63 getRotation()));
60
61 return drawinglayer::primitive2d::Primitive2DSequence(&aPrimitive, 1);
62 }
63 }
64
64
65 return drawinglayer::primitive2d::Primitive2DSequence(&aPrimitive, 1);
66 }
67 }
68
65 OverlayAnimatedBitmapEx::OverlayAnimatedBitmapEx(
66 const basegfx::B2DPoint& rBasePos,
67 const BitmapEx& rBitmapEx1,
68 const BitmapEx& rBitmapEx2,
69 sal_uInt32 nBlinkTime,
70 sal_uInt16 nCenX1,
71 sal_uInt16 nCenY1,
72 sal_uInt16 nCenX2,
73 sal_uInt16 nCenY2)
74 : OverlayObjectWithBasePosition(rBasePos, Color(COL_WHITE)),
75 maBitmapEx1(rBitmapEx1),
76 maBitmapEx2(rBitmapEx2),
77 mnCenterX1(nCenX1), mnCenterY1(nCenY1),
78 mnCenterX2(nCenX2), mnCenterY2(nCenY2),
79 mnBlinkTime(nBlinkTime),
80 mbOverlayState(false)
69 OverlayAnimatedBitmapEx::OverlayAnimatedBitmapEx(
70 const basegfx::B2DPoint& rBasePos,
71 const BitmapEx& rBitmapEx1,
72 const BitmapEx& rBitmapEx2,
73 sal_uInt32 nBlinkTime,
74 sal_uInt16 nCenX1,
75 sal_uInt16 nCenY1,
76 sal_uInt16 nCenX2,
77 sal_uInt16 nCenY2,
78 double fShearX,
79 double fRotation)
80 : OverlayObjectWithBasePosition(rBasePos, Color(COL_WHITE)),
81 maBitmapEx1(rBitmapEx1),
82 maBitmapEx2(rBitmapEx2),
83 mnCenterX1(nCenX1), mnCenterY1(nCenY1),
84 mnCenterX2(nCenX2), mnCenterY2(nCenY2),
85 mnBlinkTime(nBlinkTime),
86 mfShearX(fShearX),
87 mfRotation(fRotation),
88 mbOverlayState(false)
81 {
89 {
82 // set AllowsAnimation flag to mark this object as animation capable
83 mbAllowsAnimation = true;
90 // set AllowsAnimation flag to mark this object as animation capable
91 mbAllowsAnimation = true;
84
92
85 // #i53216# check blink time value range
86 mnBlinkTime = impCheckBlinkTimeValueRange(mnBlinkTime);
87 }
93 // #i53216# check blink time value range
94 mnBlinkTime = impCheckBlinkTimeValueRange(mnBlinkTime);
95 }
88
89 OverlayAnimatedBitmapEx::~OverlayAnimatedBitmapEx()
90 {
91 }
92
93 void OverlayAnimatedBitmapEx::setBitmapEx1(const BitmapEx& rNew)
94 {
95 if(rNew != maBitmapEx1)

--- 105 unchanged lines hidden ---
96
97 OverlayAnimatedBitmapEx::~OverlayAnimatedBitmapEx()
98 {
99 }
100
101 void OverlayAnimatedBitmapEx::setBitmapEx1(const BitmapEx& rNew)
102 {
103 if(rNew != maBitmapEx1)

--- 105 unchanged lines hidden ---