Visualization Library 2.0.0

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | List of all members
vl::RectI Class Reference

The RectI class represents a 2D rectangular area using int precision. More...

#include <Rect.hpp>

+ Inheritance diagram for vl::RectI:

Public Member Functions

 RectI ()
 
 RectI (int x, int y, int width, int height)
 
 RectI (const Rect< int > &other)
 
 RectI (const RectI &other)
 
RectIoperator= (const Rect< int > &other)
 
RectIoperator= (const RectI &other)
 
int top () const
 
int right () const
 
ivec2 bottomLeft () const
 
ivec2 topRight () const
 
- Public Member Functions inherited from vl::Rect< int >
 Rect (const Rect &other)
 
 Rect ()
 
 Rect (int x, int y, int width, int height)
 
int x () const
 
int y () const
 
int width () const
 
int height () const
 
int bottom () const
 
int left () const
 
int top () const
 
int right () const
 
void setX (int x)
 
void setY (int y)
 
void setWidth (int w)
 
void setHeight (int h)
 
bool isNull () const
 
bool isPoint () const
 
Rect intersected (const Rect &other) const
 
Rect united (const Rect &other) const
 
bool operator< (const Rect &other) const
 Defines a sort of lexicographic sorting that make possible the use of the Rect class with STL containers like std::set, std::map etc. More...
 

Additional Inherited Members

- Protected Attributes inherited from vl::Rect< int >
int mX
 
int mY
 
int mWidth
 
int mHeight
 

Detailed Description

The RectI class represents a 2D rectangular area using int precision.

This class is mainly used to manipulate rectangles in pixel coordinates (as opposed to real coordinates). The RectI and RectF differ in the following way:

Definition at line 163 of file Rect.hpp.

Constructor & Destructor Documentation

◆ RectI() [1/4]

vl::RectI::RectI ( )
inline

Definition at line 166 of file Rect.hpp.

◆ RectI() [2/4]

vl::RectI::RectI ( int  x,
int  y,
int  width,
int  height 
)
inline

◆ RectI() [3/4]

vl::RectI::RectI ( const Rect< int > &  other)
inline

Definition at line 168 of file Rect.hpp.

◆ RectI() [4/4]

vl::RectI::RectI ( const RectI other)
inline

Definition at line 169 of file Rect.hpp.

Member Function Documentation

◆ bottomLeft()

ivec2 vl::RectI::bottomLeft ( ) const
inline

Definition at line 175 of file Rect.hpp.

References vl::Rect< T >::bottom(), and vl::Rect< T >::left().

◆ operator=() [1/2]

RectI& vl::RectI::operator= ( const Rect< int > &  other)
inline

◆ operator=() [2/2]

RectI& vl::RectI::operator= ( const RectI other)
inline

◆ right()

int vl::RectI::right ( ) const
inline

Definition at line 174 of file Rect.hpp.

References vl::Rect< T >::mWidth, and vl::Rect< T >::mX.

Referenced by vl::Image::copySubImage().

◆ top()

int vl::RectI::top ( ) const
inline

Definition at line 173 of file Rect.hpp.

References vl::Rect< T >::mHeight, and vl::Rect< T >::mY.

Referenced by vl::Image::copySubImage().

◆ topRight()

ivec2 vl::RectI::topRight ( ) const
inline

Definition at line 176 of file Rect.hpp.

References vl::Rect< T >::right(), and vl::Rect< T >::top().


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