TAttLine


class description - source file - inheritance tree

class TAttLine


    public:
TAttLine TAttLine() TAttLine TAttLine(Color_t lcolor, Style_t lstyle, Width_t lwidth) TAttLine TAttLine(TAttLine&) virtual void ~TAttLine() TClass* Class() void Copy(TAttLine& attline) Int_t DistancetoLine(Int_t px, Int_t py, Float_t xp1, Float_t yp1, Float_t xp2, Float_t yp2) Color_t GetLineColor() Style_t GetLineStyle() Width_t GetLineWidth() virtual TClass* IsA() virtual void Modify() virtual void Reset(Option_t* option) virtual void SaveLineAttributes(ofstream& out, Text_t* name, Int_t coldef = 1, Int_t stydef = 1, Int_t widdef = 1) virtual void SetLineAttributes() virtual void SetLineColor(Color_t lcolor) virtual void SetLineStyle(Style_t lstyle) virtual void SetLineWidth(Width_t lwidth) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b)

Data Members

protected:
Color_t fLineColor line color Style_t fLineStyle line style Width_t fLineWidth line width


See also

TBox, TEllipse, TF1, TGXW, TGraph, TH1, TLatex, TLego, TLine, TMCParticle, TMarker3DBox, TNode, TParticle, TPolyLine, TPolyLine3D, TPostScript, TPrimary, TShape, TStyle, TTree

Class Description

*-*-*-*-*-*-*-*-*-*-*-*-*Line Attributes class*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                      =====================
*-*  Line attributes are:
*-*    Line Color (see TAttFill for the list of colors)
*-*    Line Style 1=solid, 2=dash, 3=dash-dot, 4=dot-dot
*-*    Line Width expressed in pixel units
*-*
*-*  This class is used (in general by secondary inheritance)
*-*  by many other classes (graphics, histograms).
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

TAttLine()
*-*-*-*-*-*-*-*-*-*-*-*-*AttLine default constructor*-*-*-*-*-*-*-*-*-*-*-*
*-*                      ===========================
*-*  Default line attributes are taking from the current style
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

TAttLine(Color_t color, Style_t style, Width_t width)
*-*-*-*-*-*-*-*-*-*-*-*-*AttLine normal constructor*-*-*-*-*-*-*-*-*-*-*-*
*-*                      ===========================
*-*  Line attributes are taking from the argument list
*-*    color : must be one of the valid color index
*-*    style : 1=solid, 2=dash, 3=dash-dot, 4=dot-dot
*-*    width : expressed in pixel units
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

~TAttLine()
*-*-*-*-*-*-*-*-*-*-*-*-*AttLine destructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                      =================

void Copy(TAttLine &attline)
*-*-*-*-*-*-*-*-*Copy this line attributes to a new attline*-*-*-*-*-*-*-*-*
*-*              ==========================================

Int_t DistancetoLine(Int_t px, Int_t py, Float_t xp1, Float_t yp1, Float_t xp2, Float_t yp2 )
*-*-*-*-*-*-*-*-*-*-*Compute distance from point px,py to a line*-*-*-*-*-*
*-*                  ===========================================
*-*  Compute the closest distance of approach from point px,py to this line.
*-*  The distance is computed in pixels units.
*-*
*-*  Algorithm:
*-*
*-*    A(x1,y1)         P                             B(x2,y2)
*-*    ------------------------------------------------
*-*                     I
*-*                     I
*-*                     I
*-*                     I
*-*                    M(x,y)
*-*
*-*  Let us call  a = distance AM     A=a**2
*-*               b = distance BM     B=b**2
*-*               c = distance AB     C=c**2
*-*               d = distance PM     D=d**2
*-*               u = distance AP     U=u**2
*-*               v = distance BP     V=v**2     c = u + v
*-*
*-*  D = A - U
*-*  D = B - V  = B -(c-u)**2
*-*     ==> u = (A -B +C)/2c
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void Modify()
*-*-*-*-*-*-*-*-*-*Change current line attributes if necessary*-*-*-*-*-*-*
*-*                ===========================================

void Reset(Option_t *)
*-*-*-*-*-*-*-*-*Reset this line attributes to default values*-*-*-*-*-*-*
*-*              ============================================

void SaveLineAttributes(ofstream &out, const Text_t *name, Int_t coldef, Int_t stydef, Int_t widdef)
 Save line attributes as C++ statement(s) on output stream out

void SetLineAttributes()
*-*-*-*-*-*-*-*-*Invoke the DialogCanvas Line attributes*-*-*-*-*-*-*
*-*              =======================================



Inline Functions


            Color_t GetLineColor()
            Style_t GetLineStyle()
            Width_t GetLineWidth()
               void SetLineColor(Color_t lcolor)
               void SetLineStyle(Style_t lstyle)
               void SetLineWidth(Width_t lwidth)
            TClass* Class()
            TClass* IsA()
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
           TAttLine TAttLine(TAttLine&)


Author: Rene Brun 28/11/94
Last update: 2.22/09 12/07/99 17.51.22 by Rene Brun
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


ROOT page - Class index - 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.