ROOT  6.06/09
Reference Guide
Public Member Functions | Private Attributes | List of all members
TGLRect Class Reference

Viewport (pixel base) 2D rectangle class.

Definition at line 426 of file TGLUtil.h.

Public Member Functions

 TGLRect ()
 Positive width/height. More...
 
 TGLRect (Int_t x, Int_t y, Int_t width, Int_t height)
 Construct rect object, corner (x,y), dimensions 'width', 'height'. More...
 
 TGLRect (Int_t x, Int_t y, UInt_t width, UInt_t height)
 Construct rect object, corner (x,y), dimensions 'width', 'height'. More...
 
virtual ~TGLRect ()
 Destroy rect object. More...
 
void Set (Int_t x, Int_t y, Int_t width, Int_t height)
 
void SetCorner (Int_t x, Int_t y)
 
void Offset (Int_t dX, Int_t dY)
 
void Expand (Int_t x, Int_t y)
 Expand the rect to encompass point (x,y) More...
 
const Int_tCArr () const
 
Int_tCArr ()
 
Int_t X () const
 
Int_tX ()
 
Int_t Y () const
 
Int_tY ()
 
Int_t Width () const
 
Int_tWidth ()
 
Int_t Height () const
 
Int_tHeight ()
 
Int_t CenterX () const
 
Int_t CenterY () const
 
Int_t Left () const
 
Int_t Right () const
 
Int_t Top () const
 
Int_t Bottom () const
 
Int_t Diagonal () const
 Return the diagonal of the rectangle. More...
 
Int_t Longest () const
 
Double_t Aspect () const
 
Rgl::EOverlap Overlap (const TGLRect &other) const
 Return overlap result (kInside, kOutside, kPartial) of this rect with 'other'. More...
 
 ClassDef (TGLRect, 0)
 

Private Attributes

Int_t fX
 
Int_t fY
 
Int_t fWidth
 Corner. More...
 
Int_t fHeight
 

#include <TGLUtil.h>

Constructor & Destructor Documentation

TGLRect::TGLRect ( )

Positive width/height.

Construct empty rect object, corner (0,0), width/height 0.

Definition at line 259 of file TGLUtil.cxx.

TGLRect::TGLRect ( Int_t  x,
Int_t  y,
Int_t  width,
Int_t  height 
)

Construct rect object, corner (x,y), dimensions 'width', 'height'.

Definition at line 267 of file TGLUtil.cxx.

TGLRect::TGLRect ( Int_t  x,
Int_t  y,
UInt_t  width,
UInt_t  height 
)

Construct rect object, corner (x,y), dimensions 'width', 'height'.

Definition at line 275 of file TGLUtil.cxx.

TGLRect::~TGLRect ( )
virtual

Destroy rect object.

Definition at line 284 of file TGLUtil.cxx.

Member Function Documentation

Double_t TGLRect::Aspect ( ) const
inline
Int_t TGLRect::Bottom ( ) const
inline

Definition at line 464 of file TGLUtil.h.

const Int_t* TGLRect::CArr ( ) const
inline
Int_t* TGLRect::CArr ( )
inline

Definition at line 449 of file TGLUtil.h.

Int_t TGLRect::CenterX ( ) const
inline

Definition at line 459 of file TGLUtil.h.

Int_t TGLRect::CenterY ( ) const
inline

Definition at line 460 of file TGLUtil.h.

TGLRect::ClassDef ( TGLRect  ,
 
)
Int_t TGLRect::Diagonal ( ) const

Return the diagonal of the rectangle.

Definition at line 316 of file TGLUtil.cxx.

Referenced by TGLPhysicalShape::CalculateShapeLOD(), TEveCaloLegoGL::DrawAxis2D(), TEveCaloLegoGL::DrawAxis3D(), and TGLViewer::ViewportDiagonal().

void TGLRect::Expand ( Int_t  x,
Int_t  y 
)

Expand the rect to encompass point (x,y)

Definition at line 291 of file TGLUtil.cxx.

Referenced by TGLCamera::ViewportRect().

Int_t TGLRect::Height ( ) const
inline
Int_t& TGLRect::Height ( )
inline

Definition at line 458 of file TGLUtil.h.

Int_t TGLRect::Left ( ) const
inline

Definition at line 461 of file TGLUtil.h.

Int_t TGLRect::Longest ( ) const
inline

Definition at line 499 of file TGLUtil.h.

void TGLRect::Offset ( Int_t  dX,
Int_t  dY 
)
inline

Definition at line 492 of file TGLUtil.h.

Rgl::EOverlap TGLRect::Overlap ( const TGLRect other) const

Return overlap result (kInside, kOutside, kPartial) of this rect with 'other'.

Definition at line 327 of file TGLUtil.cxx.

Referenced by TGLCamera::ViewportOverlap().

Int_t TGLRect::Right ( ) const
inline

Definition at line 462 of file TGLUtil.h.

void TGLRect::Set ( Int_t  x,
Int_t  y,
Int_t  width,
Int_t  height 
)
inline
void TGLRect::SetCorner ( Int_t  x,
Int_t  y 
)
inline

Definition at line 485 of file TGLUtil.h.

Referenced by TGLCamera::ViewportRect().

Int_t TGLRect::Top ( ) const
inline

Definition at line 463 of file TGLUtil.h.

Int_t TGLRect::Width ( ) const
inline
Int_t& TGLRect::Width ( )
inline

Definition at line 456 of file TGLUtil.h.

Int_t TGLRect::X ( ) const
inline
Int_t& TGLRect::X ( )
inline

Definition at line 452 of file TGLUtil.h.

Int_t TGLRect::Y ( ) const
inline
Int_t& TGLRect::Y ( )
inline

Definition at line 454 of file TGLUtil.h.

Member Data Documentation

Int_t TGLRect::fHeight
private

Definition at line 431 of file TGLUtil.h.

Referenced by Aspect(), Bottom(), Diagonal(), Expand(), Height(), Longest(), Overlap(), and Set().

Int_t TGLRect::fWidth
private

Corner.

Definition at line 431 of file TGLUtil.h.

Referenced by Aspect(), Diagonal(), Expand(), Longest(), Overlap(), Right(), Set(), and Width().

Int_t TGLRect::fX
private

Definition at line 430 of file TGLUtil.h.

Referenced by CArr(), Expand(), Left(), Offset(), Overlap(), Set(), SetCorner(), and X().

Int_t TGLRect::fY
private

Definition at line 430 of file TGLUtil.h.

Referenced by Expand(), Offset(), Overlap(), Set(), SetCorner(), Top(), and Y().


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