43 if(rPixelSize.
Width() > 0 && rPixelSize.
Height() > 0)
66 aInverseViewTransformation.
invert();
68 aLogicSize = aInverseViewTransformation * aLogicSize;
72 bool bUseTargetTopLeft(
true);
73 bool bNeedsClipping(
false);
79 bUseTargetTopLeft =
false;
82 case WallpaperStyle::Scale :
87 case WallpaperStyle::TopLeft :
92 case WallpaperStyle::Top :
95 aTargetTopLeft.
setX(aCenter.
getX() - (aLogicSize.
getX() * 0.5));
98 case WallpaperStyle::TopRight :
103 case WallpaperStyle::Left :
106 aTargetTopLeft.
setY(aCenter.
getY() - (aLogicSize.
getY() * 0.5));
109 case WallpaperStyle::Center :
112 aTargetTopLeft = aCenter - (aLogicSize * 0.5);
115 case WallpaperStyle::Right :
119 aTargetTopLeft.
setY(aCenter.
getY() - (aLogicSize.
getY() * 0.5));
122 case WallpaperStyle::BottomLeft :
127 case WallpaperStyle::Bottom :
130 aTargetTopLeft.
setX(aCenter.
getX() - (aLogicSize.
getX() * 0.5));
134 case WallpaperStyle::BottomRight :
141 if(bUseTargetTopLeft)
144 const basegfx::B2DRange aTargetRange(aTargetTopLeft, aTargetTopLeft + aLogicSize);
149 aObjectTransform.
set(0, 0, aTargetRange.
getWidth());
151 aObjectTransform.
set(0, 2, aTargetRange.
getMinX());
152 aObjectTransform.
set(1, 2, aTargetRange.
getMinY());
158 aRetval = xReference;
174 aRelativeTopLeft.
setX(0.5 - aRelativeSize.
getX());
175 aRelativeTopLeft.
setY(0.5 - aRelativeSize.
getY());
194 aFillGraphicAttribute));
195 aRetval = xFillBitmap;
198 bNeedsClipping =
true;
208 std::move(aPolyPolygon),
210 aRetval = xClippedFill;
217 rContainer.push_back(aRetval);
224 : maObjectRange(rObjectRange),
225 maBitmapEx(rBitmapEx),
226 meWallpaperStyle(eWallpaperStyle)
232 if(ViewTransformationDependentPrimitive2D::operator==(rPrimitive))
const Size & GetSizePixel() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
void set(sal_uInt16 nRow, sal_uInt16 nColumn, double fValue)
B2DPoint getMaximum() const
bool isInside(const Tuple2D< TYPE > &rTuple) const
css::geometry::RealRectangle2D getRange(const css::uno::Sequence< css::beans::PropertyValue > &rViewParameters)
The getRange implementation for UNO API will use getRange from this implementation.
FillGraphicPrimitive2D class.
WallpaperBitmapPrimitive2D class.
WallpaperBitmapPrimitive2D(const basegfx::B2DRange &rObjectRange, const BitmapEx &rBitmapEx, WallpaperStyle eWallpaperStyle)
constructor
const basegfx::B2DRange & getLocalObjectRange() const
data read access
virtual bool operator==(const BasePrimitive2D &rPrimitive) const override
compare operator
const BitmapEx & getBitmapEx() const
virtual void create2DDecomposition(Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const override
create local decomposition
virtual sal_uInt32 getPrimitive2DID() const override
provide unique ID
WallpaperStyle getWallpaperStyle() const
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D &rViewInformation) const override
get B2Drange
#define PRIMITIVE2D_ID_WALLPAPERBITMAPPRIMITIVE2D
B2DHomMatrix createScaleTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fTranslateX, double fTranslateY)
B2DPolygon createPolygonFromRect(const B2DRectangle &rRect, double fRadiusX, double fRadiusY)