class TGRectangle


TGDimension, TGPosition, TGLongPosition, TGInsets and TGRectangle

Several small geometry classes that implement dimensions
(width and height), positions (x and y), insets and rectangles.
They are trivial and their members are public.


Function Members (Methods)

public:
TGRectangle()
TGRectangle(const TGRectangle& r)
TGRectangle(const TGPosition& p, const TGDimension& d)
TGRectangle(Int_t rx, Int_t ry, UInt_t rw, UInt_t rh)
virtual~TGRectangle()
Int_tArea() const
static TClass*Class()
Bool_tContains(const TGPosition& p) const
Bool_tContains(Int_t px, Int_t py) const
voidEmpty()
Bool_tIntersects(const TGRectangle& r) const
virtual TClass*IsA() const
Bool_tIsEmpty() const
TGPositionLeftTop() const
voidMerge(const TGRectangle& r)
TGRectangle&operator=(const TGRectangle&)
TGPositionRightBottom() const
virtual voidShowMembers(TMemberInspector& insp, char* parent)
TGDimensionSize() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)

Data Members

public:
UInt_tfHheight
UInt_tfWwidth
Int_tfXx position
Int_tfYy position

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void Merge(const TGRectangle& r)
 Merge parameters
TGRectangle(const TGRectangle& r)
 constructors
{ Empty(); }
TGRectangle(Int_t rx, Int_t ry, UInt_t rw, UInt_t rh)
{ }
TGRectangle(const TGPosition& p, const TGDimension& d)
{ }
TGRectangle(const TGRectangle& r)
{ }
virtual ~TGRectangle()
{ }
Bool_t Contains(Int_t px, Int_t py) const
 methods
Bool_t Contains(const TGPosition& p) const
Bool_t Intersects(const TGRectangle& r) const
Int_t Area()
{ return (fW * fH); }
TGDimension Size()
{ return TGDimension(fW, fH); }
TGPosition LeftTop()
{ return TGPosition(fX, fY); }
TGPosition RightBottom()
{ return TGPosition(fX + (Int_t) fW - 1, fY + (Int_t) fH - 1); }
void Empty()
{ fX = fY = 0; fW = fH = 0; }
Bool_t IsEmpty()
{ return ((fW == 0) && (fH == 0)); }

Author: Fons Rademakers 02/01/98
Last change: root/gui:$Id: TGDimension.h 23115 2008-04-10 13:35:37Z rdm $
Last generated: 2008-06-25 08:42
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.