library: libCore
#include "TAttLine.h"

TAttLine


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

class TAttLine

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
TAttLine()
TAttLine(const TAttLine&)
TAttLine(Color_t lcolor, Style_t lstyle, Width_t lwidth)
virtual~TAttLine()
static TClass*Class()
voidCopy(TAttLine& attline) const
Int_tDistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
virtual Color_tGetLineColor() const
virtual Style_tGetLineStyle() const
virtual Width_tGetLineWidth() const
virtual TClass*IsA() const
virtual voidModify()
TAttLine&operator=(const TAttLine&)
virtual voidResetAttLine(Option_t* option = "")
virtual voidSaveLineAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t widdef = 1)
virtual voidSetLineAttributes()
virtual voidSetLineColor(Color_t lcolor)
virtual voidSetLineStyle(Style_t lstyle)
virtual voidSetLineWidth(Width_t lwidth)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)

Data Members

protected:
Color_tfLineColorline color
Style_tfLineStyleline style
Width_tfLineWidthline width

Class Description

*-*-*-*-*-*-*-*-*-*-*-*-*Line Attributes class*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                      =====================
*-*  Line attributes are:
*-*    Line Color (see TAttFill for the list of colors)
*-*    Line Width expressed in pixel units
*-*    Line Style 1=solid, 2=dash, 3=dot-dot, 4=dash-dot. Additional line
*-*               styles can be defined using TStyle::SetLineStyleString.
*-*               Example:
*-*               gStyle->SetLineStyleString(5,"20 12 4 12");
*-*               gStyle->SetLineStyleString(6,"20 12 4 12 4 12 4 12");
*-*               gStyle->SetLineStyleString(7,"20 20");
*-*               gStyle->SetLineStyleString(8,"20 12 4 12 4 12");
*-*               gStyle->SetLineStyleString(9,"80 20");
*-*
/* */
*-*
*-*  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. New styles can be 
*-*            defined using TStyle::SetLineStyleString.
*-*    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, Double_t xp1, Double_t yp1, Double_t xp2, Double_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 ResetAttLine(Option_t *)
*-*-*-*-*-*-*-*-*Reset this line attributes to default values*-*-*-*-*-*-*
*-*              ============================================
void SaveLineAttributes(ostream &out, const char *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*-*-*-*-*-*-*
*-*              =======================================
TAttLine()
Color_t GetLineColor()
{return fLineColor;}
Style_t GetLineStyle()
{return fLineStyle;}
Width_t GetLineWidth()
{return fLineWidth;}
void SetLineColor(Color_t lcolor)
{ fLineColor = lcolor;}
void SetLineStyle(Style_t lstyle)
{ fLineStyle = lstyle;}
void SetLineWidth(Width_t lwidth)
{ fLineWidth = lwidth;}

Author: Rene Brun 28/11/94
Last update: root/base:$Name: $:$Id: TAttLine.cxx,v 1.13 2006/07/03 16:10:43 brun 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.