GUIDOLib  1.7.7
Guido Engine Internal Documentation
GRTempo.h
1 #ifndef GRTempo_H
2 #define GRTempo_H
3 
4 /*
5  GUIDO Library
6  Copyright (C) 2002 Holger Hoos, Juergen Kilian, Kai Renz
7  Copyright (C) 2002-2017 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 #include "GRTagARNotationElement.h"
19 
20 class ARTempo;
21 class GRStaff;
22 class VGDevice;
23 class VGFont;
24 
29 {
30  public:
32 
33  GRTempo(GRStaff *, const ARTempo * );
34  virtual ~GRTempo() {}
35 
36  virtual void OnDraw( VGDevice & dev ) const;
37  virtual unsigned int getTextAlign() const;
38  virtual const GRTempo * isGRTempo() const { return this; }
39 
40  private:
41  TYPE_TIMEPOSITION fDate;
42 
43  float DrawText( VGDevice & hdc, const char * cp, float xOffset, float yOffset) const;
44 
45  float getXPos () const;
46  float getYAlign (float fsize) const;
47  float getXAlign () const;
48 
49  const VGFont* fFont = 0;
50  const VGFont* fMusicFont = 0;
51  std::string fFormat;
52  float fNoteScale = 1.f; // used to scale the note according to the font size
53  float fYAlign = 0.f; // used as note Y offset acording to text vertical align
54  float fXAlign = 0.f; // used as note X offset acording to text horizontal align
55 
56  unsigned int fTextAlign;
57 };
58 
59 #endif
GRTempo::OnDraw
virtual void OnDraw(VGDevice &dev) const
GRTempo::getTextAlign
virtual unsigned int getTextAlign() const
Fraction
Numerator and denominator.
Definition: Fraction.h:23
GRStaff
A GRStaff represents a single line of music.
Definition: GRStaff.h:181
GRTempo::GRTempo
GRTempo(GRStaff *, const ARTempo *)
VGDevice
Generic platform independant drawing device.
Definition: VGDevice.h:68
GRTempo
Graphical representation of the tempo.
Definition: GRTempo.h:28
GRNotationElement::getDuration
virtual const TYPE_DURATION & getDuration() const
Definition: GRNotationElement.h:116
GRTagARNotationElement
GRTagARNotationElement.
Definition: GRTagARNotationElement.h:26
ARTempo
The tempo tag parameter.
Definition: ARTempo.h:72
VGFont
Generic pure virtual & device-independant font class.
Definition: VGFont.h:36
GRTempo::~GRTempo
virtual ~GRTempo()
Definition: GRTempo.h:34
GRTempo::isGRTempo
virtual const GRTempo * isGRTempo() const
Definition: GRTempo.h:38

Guido Project Copyright © 2019 Grame-CNCM