GUIDOLib  1.7.7
Guido Engine Internal Documentation
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
GRNoteDot.h
1 #ifndef GRNoteDot_H
2 #define GRNoteDot_H
3 
4 /*
5  GUIDO Library
6  Copyright (C) 2002 Holger Hoos, Juergen Kilian, Kai Renz
7  Copyright (C) 2003, 2004 Grame
8 
9  This Source Code Form is subject to the terms of the Mozilla Public
10  License, v. 2.0. If a copy of the MPL was not distributed with this
11  file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 
13  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
14  research@grame.fr
15 
16 */
17 
18 
19 #include "GRNotationElement.h"
20 #include "ARTHead.h"
21 
22 class GREvent;
23 class GRSingleNote;
24 
25 
30 {
31  public:
32  friend class GREvent;
33  friend class GRSingleNote;
35 
36  GRNoteDot( GREvent * inNote, const TYPE_DURATION & duration,
37  float notebreite );
38  GRNoteDot( GREvent * inNote, float notebreite, int inDotCount );
39  virtual ~GRNoteDot();
40 
41  virtual void OnDraw( VGDevice & hdc ) const;
42  // virtual void setPosition(const NVPoint &position);
43 
44  virtual int getNumDots() const { return mDots; }
45 
46  virtual const NVPoint & getReferencePosition() const { return refpos; }
47 
48  virtual const NVPoint & getOffset() const { return mOffset; }
49  virtual void addOffsetX(float inX) { mOffset.x += inX; }
50  virtual void addOffsetY(float inY) { mOffset.y += inY; }
51 
52  virtual const unsigned char * getColRef() const { return mColRef; }
53  virtual float getSize() const { return size; }
54 
55  static int DurationToDotCount( const TYPE_DURATION & duration );
56 
57  virtual void adjustHorizontalDotPosition(float inNoteSize, ARTHead::HEADSTATE inHeadState, GDirection inGlobalStemDirection);
58 
59  protected:
60 
61  void GRNoteDotInit( GREvent * inNote, float notebreite );
62 
63  // long notebreite;
64  int mDots;
65  static NVPoint refpos;
67  unsigned char * mColRef;
68  float size;
69 };
70 
71 #endif
GRNoteDot::addOffsetX
virtual void addOffsetX(float inX)
Definition: GRNoteDot.h:49
GRSingleNote
Graphical representation of a note event.
Definition: GRSingleNote.h:38
GRNoteDot
This class provides a note with a stem and a correct flag.
Definition: GRNoteDot.h:29
GRNoteDot::getSize
virtual float getSize() const
Definition: GRNoteDot.h:53
GRNoteDot::getColRef
virtual const unsigned char * getColRef() const
Definition: GRNoteDot.h:52
duration
GuidoDate duration(CGRHandler inHandleGR)
Returns the music duration of a score.
GRNoteDot::GRNoteDotInit
void GRNoteDotInit(GREvent *inNote, float notebreite)
NVPoint::x
float x
Definition: NVPoint.h:68
GRNoteDot::size
float size
Definition: GRNoteDot.h:68
Fraction
Numerator and denominator.
Definition: Fraction.h:23
GRNoteDot::OnDraw
virtual void OnDraw(VGDevice &hdc) const
GRNotationElement
parent class for all notation elements.
Definition: GRNotationElement.h:54
GRNoteDot::~GRNoteDot
virtual ~GRNoteDot()
GREvent
Graphical representation for an event (= has duration).
Definition: GREvent.h:61
NVPoint
Definition: NVPoint.h:20
GRNoteDot::GRNoteDot
GRNoteDot(GREvent *inNote, const TYPE_DURATION &duration, float notebreite)
NVPoint::y
float y
Definition: NVPoint.h:69
GRNoteDot::getReferencePosition
virtual const NVPoint & getReferencePosition() const
Retrieves the Symbol-reference-position with respect to the GUIDO-reference-position.
Definition: GRNoteDot.h:46
VGDevice
Generic platform independant drawing device.
Definition: VGDevice.h:68
GRNoteDot::getOffset
virtual const NVPoint & getOffset() const
Definition: GRNoteDot.h:48
GRNoteDot::DurationToDotCount
static int DurationToDotCount(const TYPE_DURATION &duration)
GObject::addToOffset
virtual void addToOffset(const NVPoint &)
Definition: GObject.h:59
ARTHead::HEADSTATE
HEADSTATE
Definition: ARTHead.h:80
GRNoteDot::mDots
int mDots
Definition: GRNoteDot.h:64
GRNoteDot::mColRef
unsigned char * mColRef
Definition: GRNoteDot.h:67
GRNoteDot::adjustHorizontalDotPosition
virtual void adjustHorizontalDotPosition(float inNoteSize, ARTHead::HEADSTATE inHeadState, GDirection inGlobalStemDirection)
GRNoteDot::addOffsetY
virtual void addOffsetY(float inY)
Definition: GRNoteDot.h:50
GRNoteDot::refpos
static NVPoint refpos
Definition: GRNoteDot.h:65
GRNoteDot::getNumDots
virtual int getNumDots() const
Definition: GRNoteDot.h:44
GRNoteDot::mOffset
NVPoint mOffset
Definition: GRNoteDot.h:66

Guido Project Copyright © 2019 Grame-CNCM