ROOT logo
// @(#)root/qt:$Id: TQtMarker.cxx 28205 2009-04-14 19:38:00Z brun $
// Author: Valeri Fine   21/01/2002

/*************************************************************************
 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
 * Copyright (C) 2002 by Valeri Fine.                                    *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TQtRConfig.h"
#include "TQtMarker.h"
#if QT_VERSION >= 0x40000
#  include <QPolygon>
#endif /* QT_VERSION */

ClassImp(TQtMarker)

////////////////////////////////////////////////////////////////////////
//
// TQtMarker - class-utility to convert the ROOT TMarker object shape 
//             into the Qt QPointArray.
//
////////////////////////////////////////////////////////////////////////

//______________________________________________________________________________
TQtMarker::TQtMarker(int n, TPoint *xy, int type) : fNumNode(n),
               fChain(0), fCindex(0), fMarkerType(type)
{
  if (type >= 2) {
     fChain.resize(n);
     TPoint *rootPoint = xy;
     for (int i=0;i<n;i++,rootPoint++)
        fChain.setPoint(i,rootPoint->fX,rootPoint->fY);
  }
}
//______________________________________________________________________________
TQtMarker::~TQtMarker(){}
//______________________________________________________________________________
int    TQtMarker::GetNumber() const {return fNumNode;}
//______________________________________________________________________________
const QPolygon &TQtMarker::GetNodes() const {return fChain;}
//______________________________________________________________________________
int  TQtMarker::GetType() const {return fMarkerType;}

//______________________________________________________________________________
void TQtMarker::SetMarker(int n, TPoint *xy, int type)
{
//*-* Did we have a chain ?
  fNumNode = n;
  fMarkerType = type;
  if (fMarkerType >= 2) {
    fChain.resize(n);
    TPoint *rootPoint = xy;
    for (int i=0;i<n;i++,rootPoint++)
       fChain.setPoint(i,rootPoint->fX,rootPoint->fY);
  }
}
 TQtMarker.cxx:1
 TQtMarker.cxx:2
 TQtMarker.cxx:3
 TQtMarker.cxx:4
 TQtMarker.cxx:5
 TQtMarker.cxx:6
 TQtMarker.cxx:7
 TQtMarker.cxx:8
 TQtMarker.cxx:9
 TQtMarker.cxx:10
 TQtMarker.cxx:11
 TQtMarker.cxx:12
 TQtMarker.cxx:13
 TQtMarker.cxx:14
 TQtMarker.cxx:15
 TQtMarker.cxx:16
 TQtMarker.cxx:17
 TQtMarker.cxx:18
 TQtMarker.cxx:19
 TQtMarker.cxx:20
 TQtMarker.cxx:21
 TQtMarker.cxx:22
 TQtMarker.cxx:23
 TQtMarker.cxx:24
 TQtMarker.cxx:25
 TQtMarker.cxx:26
 TQtMarker.cxx:27
 TQtMarker.cxx:28
 TQtMarker.cxx:29
 TQtMarker.cxx:30
 TQtMarker.cxx:31
 TQtMarker.cxx:32
 TQtMarker.cxx:33
 TQtMarker.cxx:34
 TQtMarker.cxx:35
 TQtMarker.cxx:36
 TQtMarker.cxx:37
 TQtMarker.cxx:38
 TQtMarker.cxx:39
 TQtMarker.cxx:40
 TQtMarker.cxx:41
 TQtMarker.cxx:42
 TQtMarker.cxx:43
 TQtMarker.cxx:44
 TQtMarker.cxx:45
 TQtMarker.cxx:46
 TQtMarker.cxx:47
 TQtMarker.cxx:48
 TQtMarker.cxx:49
 TQtMarker.cxx:50
 TQtMarker.cxx:51
 TQtMarker.cxx:52
 TQtMarker.cxx:53
 TQtMarker.cxx:54
 TQtMarker.cxx:55
 TQtMarker.cxx:56
 TQtMarker.cxx:57
 TQtMarker.cxx:58
 TQtMarker.cxx:59
 TQtMarker.cxx:60