LibreOffice Module canvas (master)  1
Public Member Functions | Public Attributes | List of all members
canvas::SurfaceRect Struct Reference

This implements some equivalent to basegfx::B2IBox, but instead of two BasicBox ranges, it uses a position and a size. More...

#include <surfacerect.hxx>

Collaboration diagram for canvas::SurfaceRect:
[legend]

Public Member Functions

 SurfaceRect (const ::basegfx::B2ISize &rSize)
 
bool pointInside (sal_Int32 px, sal_Int32 py) const
 
bool intersection (const SurfaceRect &r) const
 returns true if the passed rect intersects this one. More...
 
bool inside (const SurfaceRect &r) const
 

Public Attributes

::basegfx::B2IPoint maPos
 
::basegfx::B2ISize maSize
 

Detailed Description

This implements some equivalent to basegfx::B2IBox, but instead of two BasicBox ranges, it uses a position and a size.

maPos and maSize could be replaced by:

The current allocation algorithm uses size and pos a lot. Not sure how time-critical any of this code is and if that would be a problem.

Definition at line 37 of file surfacerect.hxx.

Constructor & Destructor Documentation

canvas::SurfaceRect::SurfaceRect ( const ::basegfx::B2ISize rSize)
inlineexplicit

Definition at line 42 of file surfacerect.hxx.

Member Function Documentation

bool canvas::SurfaceRect::inside ( const SurfaceRect r) const
inline
bool canvas::SurfaceRect::intersection ( const SurfaceRect r) const
inline

returns true if the passed rect intersects this one.

Definition at line 62 of file surfacerect.hxx.

References basegfx::B2ITuple::getX(), basegfx::B2ITuple::getY(), maPos, and maSize.

Referenced by canvas::Page::isValidLocation().

bool canvas::SurfaceRect::pointInside ( sal_Int32  px,
sal_Int32  py 
) const
inline

Definition at line 48 of file surfacerect.hxx.

References basegfx::B2ITuple::getX(), and basegfx::B2ITuple::getY().

Referenced by inside().

Member Data Documentation

::basegfx::B2IPoint canvas::SurfaceRect::maPos
::basegfx::B2ISize canvas::SurfaceRect::maSize

The documentation for this struct was generated from the following file: