library: libGui
#include "TGDimension.h"

TGRectangle


class description - header file - source file
viewCVS header - viewCVS source

class TGRectangle

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
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:
Int_tfXx position
Int_tfYy position
UInt_tfWwidth
UInt_tfHheight

Class Description

                                                                      
 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.                       
                                                                      

TGRectangle()
 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)
 methods
Bool_t Contains(const TGPosition &p)
Bool_t Intersects(const TGRectangle &r)
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 Merge(const TGRectangle &r)
void Empty()
{ fX = fY = 0; fW = fH = 0; }
Bool_t IsEmpty()
{ return ((fW == 0) && (fH == 0)); }

Author: Fons Rademakers 02/01/98
Last update: root/gui:$Name: $:$Id: TGDimension.cxx,v 1.3 2004/09/01 14:34:58 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

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.