GUIDOLib  1.7.7
Guido Engine Internal Documentation
GRTempoChange.h
1 
2 #pragma once
3 
4 /*
5  GUIDO Library
6  Copyright (C) 2002 Holger Hoos, Juergen Kilian, Kai Renz
7  Copyright (C) 2002-2019 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 "GRPTagARNotationElement.h"
19 
20 
21 class TempoChange;
22 class GRStaff;
23 class VGFont;
24 
25 
29 {
30  public:
31  GRTempoChange( GRStaff * stf, const TempoChange * ar, const char* text );
32  virtual ~GRTempoChange() {}
33 
34  virtual unsigned int getTextAlign() const { return fTextAlign; }
35  virtual void OnDraw( VGDevice & hdc) const;
36  virtual void tellPosition( GObject * caller,const NVPoint & np );
37 
38  private:
39  float getYAlign (float fsize) const;
40  float getXAlign (VGDevice & hdc) const;
41  float getFormatLength (VGDevice * hdc, float lspace, const FormatStringParserResult& list) const;
42  float DrawFormatString(VGDevice& hdc, float offset, float dy, const FormatStringParserResult& list) const;
43  float DrawText( VGDevice & hdc, const char * cp, float xOffset, float yOffset, bool alignleft=false) const;
44 
45 
46  NVPoint startPos;
47  NVPoint endPos;
48 
49  float fYAlign;
50  float mdx;
51  float mdy;
52  float fAfterWidth = 0;
53  float fBeforeWidth = 0;
54 
55  const VGFont* fFont;
56  const VGFont* fMusicFont;
57  float fNoteScale;
58  unsigned int fTextAlign;
59  std::string fText;
60 
61  const TempoChange * fTempoChge;
62 };
GObject
The base class for all graphic objects.
Definition: GObject.h:54
NVPoint
Definition: NVPoint.h:20
GRTempoChange::~GRTempoChange
virtual ~GRTempoChange()
Definition: GRTempoChange.h:32
GRStaff
A GRStaff represents a single line of music.
Definition: GRStaff.h:181
GRTempoChange::tellPosition
virtual void tellPosition(GObject *caller, const NVPoint &np)
GRPTagARNotationElement
not yet documented
Definition: GRPTagARNotationElement.h:25
GRTempoChange::getTextAlign
virtual unsigned int getTextAlign() const
Definition: GRTempoChange.h:34
TempoChange
the base class for accelerando and ritardando
Definition: TempoChange.h:25
VGDevice
Generic platform independant drawing device.
Definition: VGDevice.h:68
GRTempoChange::OnDraw
virtual void OnDraw(VGDevice &hdc) const
GRTempoChange
The Accelerando notation element.
Definition: GRTempoChange.h:28
VGFont
Generic pure virtual & device-independant font class.
Definition: VGFont.h:36
GRTempoChange::GRTempoChange
GRTempoChange(GRStaff *stf, const TempoChange *ar, const char *text)

Guido Project Copyright © 2019 Grame-CNCM