20#ifndef INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERGEOMETRYHELPER_HXX
21#define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERGEOMETRYHELPER_HXX
23#include <com/sun/star/awt/Rectangle.hpp>
24#include <com/sun/star/rendering/XGraphicDevice.hpp>
25#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
26#include <com/sun/star/geometry/RealRectangle2D.hpp>
46 const css::geometry::RealRectangle2D& rBox);
52 const css::geometry::RealRectangle2D& rBox);
55 const css::awt::Rectangle& rBox);
61 const css::awt::Rectangle& rBox,
62 const sal_Int32 nXOffset,
63 const sal_Int32 nYOffset);
66 const css::awt::Rectangle& rBox1,
67 const css::awt::Rectangle& rBox2);
70 const css::geometry::RealRectangle2D& rBox1,
71 const css::geometry::RealRectangle2D& rBox2);
74 const css::geometry::RealRectangle2D& rBox,
75 const css::geometry::RealPoint2D& rPoint);
80 const css::awt::Rectangle& rBox1,
81 const css::awt::Rectangle& rBox2);
83 static css::geometry::RealRectangle2D
Union (
84 const css::geometry::RealRectangle2D& rBox1,
85 const css::geometry::RealRectangle2D& rBox2);
88 const css::awt::Rectangle& rBox1,
89 const css::awt::Rectangle& rBox2);
91 static css::uno::Reference<css::rendering::XPolyPolygon2D>
CreatePolygon(
92 const css::awt::Rectangle& rBox,
93 const css::uno::Reference<css::rendering::XGraphicDevice>& rxDevice);
95 static css::uno::Reference<css::rendering::XPolyPolygon2D>
CreatePolygon(
96 const css::geometry::RealRectangle2D& rBox,
97 const css::uno::Reference<css::rendering::XGraphicDevice>& rxDevice);
99 static css::uno::Reference<css::rendering::XPolyPolygon2D>
CreatePolygon(
100 const ::std::vector<css::awt::Rectangle>& rBoxes,
101 const css::uno::Reference<css::rendering::XGraphicDevice>& rxDevice);
Collection of geometry related convenience functions.
static css::awt::Rectangle TranslateRectangle(const css::awt::Rectangle &rBox, const sal_Int32 nXOffset, const sal_Int32 nYOffset)
static css::geometry::RealRectangle2D Intersection(const css::geometry::RealRectangle2D &rBox1, const css::geometry::RealRectangle2D &rBox2)
static sal_Int32 Floor(const double nValue)
static css::geometry::RealRectangle2D Union(const css::geometry::RealRectangle2D &rBox1, const css::geometry::RealRectangle2D &rBox2)
static sal_Int32 Round(const double nValue)
static css::uno::Reference< css::rendering::XPolyPolygon2D > CreatePolygon(const ::std::vector< css::awt::Rectangle > &rBoxes, const css::uno::Reference< css::rendering::XGraphicDevice > &rxDevice)
static bool AreRectanglesDisjoint(const css::awt::Rectangle &rBox1, const css::awt::Rectangle &rBox2)
static bool IsInside(const css::geometry::RealRectangle2D &rBox, const css::geometry::RealPoint2D &rPoint)
static css::uno::Reference< css::rendering::XPolyPolygon2D > CreatePolygon(const css::geometry::RealRectangle2D &rBox, const css::uno::Reference< css::rendering::XGraphicDevice > &rxDevice)
static css::awt::Rectangle Intersection(const css::awt::Rectangle &rBox1, const css::awt::Rectangle &rBox2)
static sal_Int32 Ceil(const double nValue)
static css::awt::Rectangle ConvertRectangleWithConstantSize(const css::geometry::RealRectangle2D &rBox)
Convert the given rectangle to integer coordinates so that width and height remain constant when only...
static css::uno::Reference< css::rendering::XPolyPolygon2D > CreatePolygon(const css::awt::Rectangle &rBox, const css::uno::Reference< css::rendering::XGraphicDevice > &rxDevice)
static css::awt::Rectangle ConvertRectangle(const css::geometry::RealRectangle2D &rBox)
Return the bounding box with integer coordinates of the given rectangle.