ROOT » GUI » GUI » TGRectangle

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)

Int_tArea() const
static TClass*Class()
Bool_tContains(const TGPosition& p) const
Bool_tContains(Int_t px, Int_t py) const
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) const
TGDimensionSize() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
TGRectangle(const TGRectangle& r)
TGRectangle(const TGPosition& p, const TGDimension& d)
TGRectangle(Int_t rx, Int_t ry, UInt_t rw, UInt_t rh)

Data Members

Int_tfXx position
Int_tfYy position

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void Merge(const TGRectangle& r)
 Merge parameters
{ 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
Bool_t Contains(const TGPosition& p) const
Bool_t Intersects(const TGRectangle& r) const
Int_t Area() const
{ return (fW * fH); }
TGDimension Size() const
{ return TGDimension(fW, fH); }
TGPosition LeftTop() const
{ return TGPosition(fX, fY); }
TGPosition RightBottom() const
{ return TGPosition(fX + (Int_t) fW - 1, fY + (Int_t) fH - 1); }
void Empty()
{ fX = fY = 0; fW = fH = 0; }
Bool_t IsEmpty() const
{ return ((fW == 0) && (fH == 0)); }