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

◆ SurfaceRect()

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

Definition at line 42 of file surfacerect.hxx.

Member Function Documentation

◆ inside()

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

◆ intersection()

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

◆ pointInside()

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

Member Data Documentation

◆ maPos

::basegfx::B2IPoint canvas::SurfaceRect::maPos

◆ maSize

::basegfx::B2ISize canvas::SurfaceRect::maSize

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