library: libGui #include "TGGC.h"

# TGGC

class description - source file - inheritance tree (.ps)

## class TGGC : public TObject, public TRefCnt

| Inheritance Chart:

`TObject`

`TRefCnt`

<-

`TGGC`

        protected:

                  TGGC(GCValues_t* values, Bool_t calledByGCPool)
          TString GetMaskString() const
             void UpdateValues(GCValues_t* v)

        public:

                            TGGC(GCValues_t* values = 0)
                            TGGC(const TGGC& g)
                    virtual ~TGGC()
             static TClass* Class()
                      Int_t GetArcMode() const
          const GCValues_t* GetAttributes() const
                    Pixel_t GetBackground() const
                      Int_t GetCapStyle() const
                   Pixmap_t GetClipMask() const
                      Int_t GetClipXOrigin() const
                      Int_t GetClipYOrigin() const
                const char* GetDashes() const
                      Int_t GetDashLen() const
                      Int_t GetDashOffset() const
                      Int_t GetFillRule() const
                      Int_t GetFillStyle() const
                    FontH_t GetFont() const
                    Pixel_t GetForeground() const
          EGraphicsFunction GetFunction() const
                 GContext_t GetGC() const
                     Bool_t GetGraphicsExposures() const
                      Int_t GetJoinStyle() const
                      Int_t GetLineStyle() const
                      Int_t GetLineWidth() const
                     Mask_t GetMask() const
                    ULong_t GetPlaneMask() const
                   Pixmap_t GetStipple() const
                      Int_t GetSubwindowMode() const
                   Pixmap_t GetTile() const
                      Int_t GetTileStipXOrigin() const
                      Int_t GetTileStipYOrigin() const
            virtual TClass* IsA() const
                 GContext_t operator()() const
                      TGGC& operator=(const TGGC& rhs)
               virtual void Print(Option_t* option) const
               virtual void SavePrimitive(ofstream& out, Option_t* option)
                       void SetArcMode(Int_t v)
                       void SetAttributes(GCValues_t* values)
                       void SetBackground(Pixel_t v)
                       void SetCapStyle(Int_t v)
                       void SetClipMask(Pixmap_t v)
                       void SetClipXOrigin(Int_t v)
                       void SetClipYOrigin(Int_t v)
                       void SetDashList(const char* v, Int_t len)
                       void SetDashOffset(Int_t v)
                       void SetFillRule(Int_t v)
                       void SetFillStyle(Int_t v)
                       void SetFont(FontH_t v)
                       void SetForeground(Pixel_t v)
                       void SetFunction(EGraphicsFunction v)
                       void SetGraphicsExposures(Bool_t v)
                       void SetJoinStyle(Int_t v)
                       void SetLineStyle(Int_t v)
                       void SetLineWidth(Int_t v)
                       void SetPlaneMask(ULong_t v)
                       void SetStipple(Pixmap_t v)
                       void SetSubwindowMode(Int_t v)
                       void SetTile(Pixmap_t v)
                       void SetTileStipXOrigin(Int_t v)
                       void SetTileStipYOrigin(Int_t v)
               virtual void ShowMembers(TMemberInspector& insp, char* parent)
               virtual void Streamer(TBuffer& b)
                       void StreamerNVirtual(TBuffer& b)

### Data Members

        protected:

          GCValues_t fValues   graphics context values + mask
          GContext_t fContext  graphics context handle

## Class Description

     TGGC and TGGCPool

     Encapsulate a graphics context used in the low level graphics.
     TGGCPool provides a pool of graphics contexts.

TGGC(GCValues_t *values, Bool_t)

     Create a graphics context (only called via TGGCPool::GetGC()).

TGGC(GCValues_t *values)

     Create a graphics context, registers GC in GCPool.

TGGC(const TGGC &g) : TObject(g), TRefCnt()

     Copy a graphics context.

~TGGC()

     Delete graphics context.

void UpdateValues(GCValues_t *values)

     Update values + mask.

void SetAttributes(GCValues_t *values)

     Set attributes as specified in the values structure.

void SetFunction(EGraphicsFunction v)

     Set graphics context drawing function.

void SetPlaneMask(ULong_t v)

     Set plane mask.

void SetForeground(ULong_t v)

     Set foreground color.

void SetBackground(ULong_t v)

     Set background color.

void SetLineWidth(Int_t v)

     Set line width.

void SetLineStyle(Int_t v)

     Set line style (kLineSolid, kLineOnOffDash, kLineDoubleDash).

void SetCapStyle(Int_t v)

     Set cap style (kCapNotLast, kCapButt, kCapRound, kCapProjecting).

void SetJoinStyle(Int_t v)

     Set line join style (kJoinMiter, kJoinRound, kJoinBevel).

void SetFillStyle(Int_t v)

     Set fill style (kFillSolid, kFillTiled, kFillStippled,
     kFillOpaeueStippled).

void SetFillRule(Int_t v)

     Set fill rule (kEvenOddRule, kWindingRule).

void SetTile(Pixmap_t v)

     Set tile pixmap for tiling operations.

void SetStipple(Pixmap_t v)

     Set 1 plane pixmap for stippling.

void SetTileStipXOrigin(Int_t v)

     X offset for tile or stipple operations.

void SetTileStipYOrigin(Int_t v)

     Y offset for tile or stipple operations.

void SetFont(FontH_t v)

     Set font.

void SetSubwindowMode(Int_t v)

     Set sub window mode (kClipByChildren, kIncludeInferiors).

void SetGraphicsExposures(Bool_t v)

     True if graphics exposure should be generated.

void SetClipXOrigin(Int_t v)

     X origin for clipping.

void SetClipYOrigin(Int_t v)

     Y origin for clipping.

void SetClipMask(Pixmap_t v)

     Bitmap for clipping.

void SetDashOffset(Int_t v)

     Patterned/dashed line offset.

void SetDashList(const char v[], Int_t len)

     Set dash pattern. First use SetDashOffset() if not 0.

void SetArcMode(Int_t v)

     Set arc mode (kArcChord, kArcPieSlice).

void Print(Option_t *) const

     Print graphics contexts info.

TString GetMaskString() const

     Returns GC mask as a string - used in SavePrimitive().

void SavePrimitive(ofstream &out, Option_t *option)

     Save graphics context info as a C++ statement(s) on output stream out

### Inline Functions

                        TGGC& operator=(const TGGC& rhs)
                   GContext_t GetGC() const
                   GContext_t operator()() const
            const GCValues_t* GetAttributes() const
                       Mask_t GetMask() const
            EGraphicsFunction GetFunction() const
                      ULong_t GetPlaneMask() const
                      Pixel_t GetForeground() const
                      Pixel_t GetBackground() const
                        Int_t GetLineWidth() const
                        Int_t GetLineStyle() const
                     Pixmap_t GetTile() const
                     Pixmap_t GetStipple() const
                        Int_t GetTileStipXOrigin() const
                        Int_t GetTileStipYOrigin() const
                        Int_t GetSubwindowMode() const
                      FontH_t GetFont() const
                       Bool_t GetGraphicsExposures() const
                        Int_t GetClipXOrigin() const
                        Int_t GetClipYOrigin() const
                     Pixmap_t GetClipMask() const
                        Int_t GetCapStyle() const
                        Int_t GetJoinStyle() const
                        Int_t GetFillStyle() const
                        Int_t GetFillRule() const
                        Int_t GetDashOffset() const
                        Int_t GetDashLen() const
                  const char* GetDashes() const
                        Int_t GetArcMode() const
                      TClass* Class()
                      TClass* IsA() const
                         void ShowMembers(TMemberInspector& insp, char* parent)
                         void Streamer(TBuffer& b)
                         void StreamerNVirtual(TBuffer& b)

Author: Fons Rademakers 20/9/2000
Last update: root/gui:$Name: $:$Id: TGGC.cxx,v 1.8 2004/04/06 21:24:06 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *