ROOT logo
// $Id: TabletStroke.h 2421 2010-07-25 18:33:07Z matevz $

// Copyright (C) 1999-2008, Matevz Tadel. All rights reserved.
// This file is part of GLED, released under GNU General Public License version 2.
// For the licensing terms see $GLEDSYS/LICENSE or http://www.gnu.org/.

#ifndef Tmp1_TabletStroke_H
#define Tmp1_TabletStroke_H

#include <Glasses/ZNode.h>
#include <Stones/STabletPoint.h>

class TabletStroke : public ZNode
{
  MAC_RNR_FRIENDS(TabletStroke);
  friend class TabletStrokeList;

private:
  void _init();

protected:
  Float_t              mStartTime; // X{GS}   7 Value()
  vSTabletPoint_t      mPoints;
  vector<Int_t>        mBreaks;
  Bool_t               bInStroke;      //!
  Bool_t               bEnableDLAtEnd; //!

  Int_t get_num_points() const;
  void  get_draw_range(Int_t& min, Int_t& max) const;

  STabletPoint pre_sym_quadratic(Int_t i0, Int_t i1, Int_t i2) const;

public:
  TabletStroke(const Text_t* n="TabletStroke", const Text_t* t=0);
  virtual ~TabletStroke();

  // Interface for TabletReader
  void BeginStroke();
  void AddPoint(Float_t x, Float_t y, Float_t t, Float_t p);
  void EndStroke(Bool_t clip_trailing_zero_pressure_points);

  void MakeWSSeed(); // X{E} 7 MButt()

  Float_t MinT() const { return mPoints.empty() ? 0 : mPoints.front().t; }
  Float_t MaxT() const { return mPoints.empty() ? 0 : mPoints.back().t;  }

  void Print(); //! X{E} 7 MButt()
  void MakeHisto(Int_t nbins=128, Float_t x_edge=0.05, Float_t y_edge=0.05); //! X{ED} 7 MCWButt()
  void MakeDeltaHistos(Int_t nbins=128); //! X{ED} 7 MCWButt()

#include "TabletStroke.h7"
  ClassDef(TabletStroke, 1);
}; // endclass TabletStroke

#endif
 TabletStroke.h:1
 TabletStroke.h:2
 TabletStroke.h:3
 TabletStroke.h:4
 TabletStroke.h:5
 TabletStroke.h:6
 TabletStroke.h:7
 TabletStroke.h:8
 TabletStroke.h:9
 TabletStroke.h:10
 TabletStroke.h:11
 TabletStroke.h:12
 TabletStroke.h:13
 TabletStroke.h:14
 TabletStroke.h:15
 TabletStroke.h:16
 TabletStroke.h:17
 TabletStroke.h:18
 TabletStroke.h:19
 TabletStroke.h:20
 TabletStroke.h:21
 TabletStroke.h:22
 TabletStroke.h:23
 TabletStroke.h:24
 TabletStroke.h:25
 TabletStroke.h:26
 TabletStroke.h:27
 TabletStroke.h:28
 TabletStroke.h:29
 TabletStroke.h:30
 TabletStroke.h:31
 TabletStroke.h:32
 TabletStroke.h:33
 TabletStroke.h:34
 TabletStroke.h:35
 TabletStroke.h:36
 TabletStroke.h:37
 TabletStroke.h:38
 TabletStroke.h:39
 TabletStroke.h:40
 TabletStroke.h:41
 TabletStroke.h:42
 TabletStroke.h:43
 TabletStroke.h:44
 TabletStroke.h:45
 TabletStroke.h:46
 TabletStroke.h:47
 TabletStroke.h:48
 TabletStroke.h:49
 TabletStroke.h:50
 TabletStroke.h:51
 TabletStroke.h:52
 TabletStroke.h:53
 TabletStroke.h:54
 TabletStroke.h:55