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

#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 hLineIntersect (sal_Int32 lx1, sal_Int32 lx2, sal_Int32 ly) const
 returns true if the horizontal line intersects the rect. More...
 
bool vLineIntersect (sal_Int32 lx, sal_Int32 ly1, sal_Int32 ly2) const
 returns true if the vertical line intersects the rect. More...
 
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

Definition at line 28 of file surfacerect.hxx.

Constructor & Destructor Documentation

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

Definition at line 33 of file surfacerect.hxx.

Member Function Documentation

bool canvas::SurfaceRect::hLineIntersect ( sal_Int32  lx1,
sal_Int32  lx2,
sal_Int32  ly 
) const
inline

returns true if the horizontal line intersects the rect.

Definition at line 63 of file surfacerect.hxx.

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

Referenced by intersection().

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 91 of file surfacerect.hxx.

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

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

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

Definition at line 49 of file surfacerect.hxx.

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

Referenced by inside().

bool canvas::SurfaceRect::vLineIntersect ( sal_Int32  lx,
sal_Int32  ly1,
sal_Int32  ly2 
) const
inline

returns true if the vertical line intersects the rect.

Definition at line 77 of file surfacerect.hxx.

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

Referenced by intersection().

Member Data Documentation

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

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