GUIDOLib  1.7.7
Guido Engine Internal Documentation
GRMark.h
1 #ifndef GRMark_H
2 #define GRMark_H
3 
4 /*
5  GUIDO Library
6  Copyright (C) 2016 Grame
7 
8  This Source Code Form is subject to the terms of the Mozilla Public
9  License, v. 2.0. If a copy of the MPL was not distributed with this
10  file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 
12  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
13  research@grame.fr
14 
15 */
16 
17 #include <string>
18 
19 #include "GRText.h"
20 
21 class ARMark;
22 class GRStaff;
23 
29 class GRMark : public GRText
30 {
31  FloatRect toSquare (const FloatRect& r) const;
32  void toDiamond (const FloatRect& r, VGDevice & hdc) const;
33  void toTriangle (const FloatRect& r, VGDevice & hdc) const;
34  void toCircle (const FloatRect& r, VGDevice & hdc) const;
35  void toEllipse (const FloatRect& r, VGDevice & hdc) const;
36  void toBracket (const FloatRect& r, VGDevice & hdc) const;
37 
38  public:
39  GRMark( GRStaff *, const ARMark * abstractRepresentationOfText );
40  virtual ~GRMark();
41 
42  virtual void OnDraw( VGDevice & hdc ) const;
43  virtual FloatRect getTextMetrics(VGDevice & hdc, const GRStaff* staff) const;
44 
45  // left and right space overriden to minimize the space taken by the mark
46  virtual float getLeftSpace() const { return 0; }
47  virtual float getRightSpace() const { return 0; }
48 
49  const ARMark * getARMark() const;
50 
51  private:
52  float yoffset (const GRStaff* staff) const;
53 };
54 
55 #endif
56 
GRMark
A rehearsal mark .
Definition: GRMark.h:29
GRMark::getLeftSpace
virtual float getLeftSpace() const
Definition: GRMark.h:46
GRMark::~GRMark
virtual ~GRMark()
GRMark::OnDraw
virtual void OnDraw(VGDevice &hdc) const
GRMark::getTextMetrics
virtual FloatRect getTextMetrics(VGDevice &hdc, const GRStaff *staff) const
GRMark::GRMark
GRMark(GRStaff *, const ARMark *abstractRepresentationOfText)
GRText
A text string.
Definition: GRText.h:34
GRStaff
A GRStaff represents a single line of music.
Definition: GRStaff.h:181
GRMark::getARMark
const ARMark * getARMark() const
ARMark
not yet documented
Definition: ARMark.h:49
VGDevice
Generic platform independant drawing device.
Definition: VGDevice.h:68
GRMark::getRightSpace
virtual float getRightSpace() const
Definition: GRMark.h:47
TRect< float >

Guido Project Copyright © 2019 Grame-CNCM