LibreOffice Module sdext (master)  1
Static Public Member Functions | List of all members
sdext::presenter::PresenterGeometryHelper Class Reference

Collection of geometry related convenience functions. More...

#include <PresenterGeometryHelper.hxx>

Static Public Member Functions

static sal_Int32 Round (const double nValue)
 
static sal_Int32 Floor (const double nValue)
 
static sal_Int32 Ceil (const double nValue)
 
static css::awt::Rectangle ConvertRectangle (const css::geometry::RealRectangle2D &rBox)
 Return the bounding box with integer coordinates of the given rectangle. More...
 
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 the position changes. More...
 
static css::geometry::RealRectangle2D ConvertRectangle (const css::awt::Rectangle &rBox)
 
static css::awt::Rectangle TranslateRectangle (const css::awt::Rectangle &rBox, const sal_Int32 nXOffset, const sal_Int32 nYOffset)
 
static css::awt::Rectangle Intersection (const css::awt::Rectangle &rBox1, const css::awt::Rectangle &rBox2)
 
static css::geometry::RealRectangle2D Intersection (const css::geometry::RealRectangle2D &rBox1, const css::geometry::RealRectangle2D &rBox2)
 
static bool IsInside (const css::geometry::RealRectangle2D &rBox, const css::geometry::RealPoint2D &rPoint)
 
static bool IsInside (const css::awt::Rectangle &rBox1, const css::awt::Rectangle &rBox2)
 Return whether rBox1 is completely inside rBox2. More...
 
static css::geometry::RealRectangle2D Union (const css::geometry::RealRectangle2D &rBox1, const css::geometry::RealRectangle2D &rBox2)
 
static bool AreRectanglesDisjoint (const css::awt::Rectangle &rBox1, const css::awt::Rectangle &rBox2)
 
static css::uno::Reference< css::rendering::XPolyPolygon2D > CreatePolygon (const css::awt::Rectangle &rBox, const css::uno::Reference< css::rendering::XGraphicDevice > &rxDevice)
 
static css::uno::Reference< css::rendering::XPolyPolygon2D > CreatePolygon (const css::geometry::RealRectangle2D &rBox, const css::uno::Reference< css::rendering::XGraphicDevice > &rxDevice)
 
static css::uno::Reference< css::rendering::XPolyPolygon2D > CreatePolygon (const ::std::vector< css::awt::Rectangle > &rBoxes, const css::uno::Reference< css::rendering::XGraphicDevice > &rxDevice)
 

Detailed Description

Collection of geometry related convenience functions.

Definition at line 33 of file PresenterGeometryHelper.hxx.

Member Function Documentation

bool sdext::presenter::PresenterGeometryHelper::AreRectanglesDisjoint ( const css::awt::Rectangle &  rBox1,
const css::awt::Rectangle &  rBox2 
)
static
sal_Int32 sdext::presenter::PresenterGeometryHelper::Ceil ( const double  nValue)
static

Definition at line 59 of file PresenterGeometryHelper.cxx.

static css::awt::Rectangle sdext::presenter::PresenterGeometryHelper::ConvertRectangle ( const css::geometry::RealRectangle2D &  rBox)
static

Return the bounding box with integer coordinates of the given rectangle.

Note that due to different rounding of the left/top and the right/bottom border the width of the resulting rectangle may differ for different positions but constant width and height.

Referenced by sdext::presenter::PresenterSlideSorter::Layout::GetBoundingBox(), sdext::presenter::PresenterNotesView::Invalidate(), sdext::presenter::PresenterSlideSorter::Paint(), sdext::presenter::PresenterScrollBar::PaintBitmap(), sdext::presenter::PresenterVerticalScrollBar::PaintComposite(), sdext::presenter::PresenterSlideSorter::PaintPreview(), sdext::presenter::PresenterNotesView::PaintText(), and sdext::presenter::PresenterScrollBar::Repaint().

geometry::RealRectangle2D sdext::presenter::PresenterGeometryHelper::ConvertRectangle ( const css::awt::Rectangle &  rBox)
static

Definition at line 89 of file PresenterGeometryHelper.cxx.

awt::Rectangle sdext::presenter::PresenterGeometryHelper::ConvertRectangleWithConstantSize ( const css::geometry::RealRectangle2D &  rBox)
static

Convert the given rectangle to integer coordinates so that width and height remain constant when only the position changes.

Definition at line 79 of file PresenterGeometryHelper.cxx.

References Round().

Referenced by sdext::presenter::PresenterVerticalScrollBar::PaintComposite().

static css::uno::Reference<css::rendering::XPolyPolygon2D> sdext::presenter::PresenterGeometryHelper::CreatePolygon ( const css::awt::Rectangle &  rBox,
const css::uno::Reference< css::rendering::XGraphicDevice > &  rxDevice 
)
static
static css::uno::Reference<css::rendering::XPolyPolygon2D> sdext::presenter::PresenterGeometryHelper::CreatePolygon ( const css::geometry::RealRectangle2D &  rBox,
const css::uno::Reference< css::rendering::XGraphicDevice > &  rxDevice 
)
static
static css::uno::Reference<css::rendering::XPolyPolygon2D> sdext::presenter::PresenterGeometryHelper::CreatePolygon ( const ::std::vector< css::awt::Rectangle > &  rBoxes,
const css::uno::Reference< css::rendering::XGraphicDevice > &  rxDevice 
)
static
sal_Int32 sdext::presenter::PresenterGeometryHelper::Floor ( const double  nValue)
static

Definition at line 54 of file PresenterGeometryHelper.cxx.

awt::Rectangle sdext::presenter::PresenterGeometryHelper::Intersection ( const css::awt::Rectangle &  rBox1,
const css::awt::Rectangle &  rBox2 
)
static
static css::geometry::RealRectangle2D sdext::presenter::PresenterGeometryHelper::Intersection ( const css::geometry::RealRectangle2D &  rBox1,
const css::geometry::RealRectangle2D &  rBox2 
)
static
bool sdext::presenter::PresenterGeometryHelper::IsInside ( const css::geometry::RealRectangle2D &  rBox,
const css::geometry::RealPoint2D &  rPoint 
)
static
bool sdext::presenter::PresenterGeometryHelper::IsInside ( const css::awt::Rectangle &  rBox1,
const css::awt::Rectangle &  rBox2 
)
static

Return whether rBox1 is completely inside rBox2.

Definition at line 145 of file PresenterGeometryHelper.cxx.

sal_Int32 sdext::presenter::PresenterGeometryHelper::Round ( const double  nValue)
static
awt::Rectangle sdext::presenter::PresenterGeometryHelper::TranslateRectangle ( const css::awt::Rectangle &  rBox,
const sal_Int32  nXOffset,
const sal_Int32  nYOffset 
)
static
geometry::RealRectangle2D sdext::presenter::PresenterGeometryHelper::Union ( const css::geometry::RealRectangle2D &  rBox1,
const css::geometry::RealRectangle2D &  rBox2 
)
static

The documentation for this class was generated from the following files: