GUIDOLib  1.7.7
A Music Score Rendering Engine
GUIDOReducedProportionalAdapter.h
Go to the documentation of this file.
1 #ifndef GUIDOREDUCEDPROPORTIONALADAPTER_H
2 #define GUIDOREDUCEDPROPORTIONALADAPTER_H
3 /*
4  GUIDO Library
5  Copyright (C) 2015 Grame
6 
7  This Source Code Form is subject to the terms of the Mozilla Public
8  License, v. 2.0. If a copy of the MPL was not distributed with this
9  file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
12  research@grame.fr
13 
14 */
15 #include <string>
16 
18 
30 {
31  public:
39  RProportional * ar2RProportional(ARHandler arh);
40 
46  RProportional * midi2RProportional(const std::string &midiFileName);
47 
53  GuidoErrCode destroyRProportional(RProportional *pr);
54 
65  GuidoErrCode setLimits(RProportional *pr, GuidoDate start, GuidoDate end, int lowpitch, int highpitch);
66 
73  GuidoErrCode drawDurationLines(RProportional *pr, bool enabled);
74 
83  GuidoErrCode enableAutoVoicesColoration(RProportional *pr, bool enabled);
84 
95  GuidoErrCode setRGBColorToVoice(RProportional *pr, int voiceNum, int r, int g, int b, int a);
96 
104  GuidoErrCode setHtmlColorToVoice(RProportional *pr, int voiceNum, const char* color);
105 
112  GuidoErrCode removeColorToVoice(RProportional *pr, int voiceNum);
113 
120  GuidoErrCode enableMeasureBars(RProportional *pr, bool enabled);
121 
129  Time2GraphicMap getMap(RProportional *pr, int width, int height);
130 
139  GuidoErrCode onDraw(RProportional *pr, int width, int height, VGDevice* dev);
140 
148  std::string svgExport(RProportional *pr, int width, int height);
149 
150 #ifdef CANVASSYSTEM
151 
157  GuidoErrCode javascriptExport(RProportional *pr, int width, int height);
158 #endif
159 };
163 #endif
~GUIDOReducedProportionalAdapter
virtual ~GUIDOReducedProportionalAdapter()
ar2RProportional
RProportional * ar2RProportional(ARHandler arh)
Creates a new reduced proportional representation from AR.
enableMeasureBars
GuidoErrCode enableMeasureBars(RProportional *pr, bool enabled)
Enables or disable measure bars (false by default)
midi2RProportional
RProportional * midi2RProportional(const std::string &midiFileName)
Creates a new reduced proportional representation from a midi file.
removeColorToVoice
GuidoErrCode removeColorToVoice(RProportional *pr, int voiceNum)
remove a color to a voice (first voice is number 1) (black by default)
onDraw
GuidoErrCode onDraw(RProportional *pr, int width, int height, VGDevice *dev)
Draw the reduced proportional representation on a VGDevice.
svgExport
std::string svgExport(RProportional *pr, int width, int height)
svgExport Draw the reduced proportional representation on SVG device and return the xml string.
setLimits
GuidoErrCode setLimits(RProportional *pr, GuidoDate start, GuidoDate end, int lowpitch, int highpitch)
Sets limits to a reduced proportional representation (start/end date, lower/higher pitch)
setHtmlColorToVoice
GuidoErrCode setHtmlColorToVoice(RProportional *pr, int voiceNum, const char *color)
Sets a html color to a voice (first voice is number 1) (black by default)
GUIDOReducedProportional.h
Time2GraphicMap
std::vector< TMapSegments > Time2GraphicMap
Definition: GUIDOScoreMap.h:89
GuidoErrCode
GuidoErrCode
The guido error codes list.
Definition: GUIDOEngine.h:211
GuidoDate
Representation of a date as a rational value.
Definition: GUIDOEngine.h:83
VGDevice
Generic platform independant drawing device.
Definition: VGDevice.h:68
drawDurationLines
GuidoErrCode drawDurationLines(RProportional *pr, bool enabled)
Enables or disable duration lines (enabled by default)
setRGBColorToVoice
GuidoErrCode setRGBColorToVoice(RProportional *pr, int voiceNum, int r, int g, int b, int a)
Sets a RGB color to a voice (first voice is number 1) (black by default)
GUIDOReducedProportionalAdapter
class_export GUIDOReducedProportionalAdapter
Definition: GUIDOReducedProportionalAdapter.h:30
ARHandler
struct NodeAR * ARHandler
Definition: GUIDOEngine.h:36
enableAutoVoicesColoration
GuidoErrCode enableAutoVoicesColoration(RProportional *pr, bool enabled)
Enables or not the automatic voices coloration (not enabled by default) If a color is manually set wi...
class_export
#define class_export
Definition: GUIDOExport.h:38
destroyRProportional
GuidoErrCode destroyRProportional(RProportional *pr)
Destroys a reduced proportional representation and releases all the associated ressources.
getMap
Time2GraphicMap getMap(RProportional *pr, int width, int height)
Gets a reduced proportional representation map.

Guido Project Copyright © 2019 Grame-CNCM