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

◆ AreRectanglesDisjoint()

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

◆ Ceil()

sal_Int32 sdext::presenter::PresenterGeometryHelper::Ceil ( const double  nValue)
static

Definition at line 61 of file PresenterGeometryHelper.cxx.

References nValue.

◆ ConvertRectangle() [1/2]

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

Definition at line 91 of file PresenterGeometryHelper.cxx.

◆ ConvertRectangle() [2/2]

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().

◆ ConvertRectangleWithConstantSize()

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 81 of file PresenterGeometryHelper.cxx.

References Round().

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

◆ CreatePolygon() [1/3]

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

◆ CreatePolygon() [2/3]

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

◆ CreatePolygon() [3/3]

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

◆ Floor()

sal_Int32 sdext::presenter::PresenterGeometryHelper::Floor ( const double  nValue)
static

Definition at line 56 of file PresenterGeometryHelper.cxx.

References nValue.

◆ Intersection() [1/2]

awt::Rectangle sdext::presenter::PresenterGeometryHelper::Intersection ( const css::awt::Rectangle &  rBox1,
const css::awt::Rectangle &  rBox2 
)
static

◆ Intersection() [2/2]

static css::geometry::RealRectangle2D sdext::presenter::PresenterGeometryHelper::Intersection ( const css::geometry::RealRectangle2D &  rBox1,
const css::geometry::RealRectangle2D &  rBox2 
)
static

◆ IsInside() [1/2]

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 147 of file PresenterGeometryHelper.cxx.

◆ IsInside() [2/2]

bool sdext::presenter::PresenterGeometryHelper::IsInside ( const css::geometry::RealRectangle2D &  rBox,
const css::geometry::RealPoint2D &  rPoint 
)
static

◆ Round()

sal_Int32 sdext::presenter::PresenterGeometryHelper::Round ( const double  nValue)
static

Definition at line 66 of file PresenterGeometryHelper.cxx.

References nValue.

Referenced by ConvertRectangleWithConstantSize().

◆ TranslateRectangle()

awt::Rectangle sdext::presenter::PresenterGeometryHelper::TranslateRectangle ( const css::awt::Rectangle &  rBox,
const sal_Int32  nXOffset,
const sal_Int32  nYOffset 
)
static

Definition at line 101 of file PresenterGeometryHelper.cxx.

◆ Union()

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: