GUIDOLib
1.7.7
A Music Score Rendering Engine
|
Classes | |
struct | GuidoElementInfos |
Information related to elements. More... | |
class | MapCollector |
an abstract class to be provided by clients to collect mappings More... | |
class | RectInfos |
information associated to a rectangle in a mapping (MapElement) More... | |
class | TimeMapCollector |
an abstract class to be provided by clients to collect time mappings More... | |
Typedefs | |
typedef std::pair< TimeSegment, FloatRect > | TMapSegments |
typedef std::pair< TimeSegment, TimeSegment > | TTimeMapSegments |
typedef std::vector< TMapSegments > | Time2GraphicMap |
typedef std::vector< TTimeMapSegments > | TTime2TimeMap |
typedef Time2GraphicMap::const_iterator | Time2GraphicMapIterator |
typedef std::pair< FloatRect, RectInfos > | MapElement |
typedef std::pair< TimeSegment, TimeSegment > | TimeMapElement |
Enumerations | |
enum | GuidoElementSelector { kGuidoPage, kGuidoSystem, kGuidoSystemSlice, kGuidoStaff, kGuidoBar, kGuidoBarAndEvent, kGuidoEvent, kClefSel, kMeterSel, kGuidoScoreElementEnd } |
enum | GuidoElementType { kNote = 1, kRest, kEmpty, kBar, kRepeatBegin, kRepeatEnd, kStaff, kSystemSlice, kSystem, kPage, kGraceNote, kClef, kMeter } |
Functions | |
float | duration () const |
gives the segment duration More... | |
bool | empty () const |
check for empty segment More... | |
bool | intersect (const TimeSegment &ts) const |
check for segments intersection More... | |
bool | include (const GuidoDate &date) const |
check for date inclusion More... | |
bool | include (const TimeSegment &ts) const |
check for segment inclusion More... | |
bool | startEqual (const TimeSegment &ts) const |
check if start date is the same More... | |
bool | operator< (const TimeSegment &ts) const |
order relationship: the smaller is the smaller first date More... | |
bool | operator== (const TimeSegment &ts) const |
TimeSegment | operator& (const TimeSegment &ts) const |
intersection operation (may return an arbitrary empty segment) More... | |
std::ostream & | operator<< (std::ostream &out, const GuidoDate &d) |
std::ostream & | operator<< (std::ostream &out, const TimeSegment &s) |
GuidoErrCode | GuidoGetMap (CGRHandler gr, int pagenum, float width, float height, GuidoElementSelector sel, MapCollector &f) |
Retrieves the graphic to time mapping, without any processing (RAW) More... | |
GuidoErrCode | GuidoGetRAWStaffMap (CGRHandler gr, int pagenum, float w, float h, int staff, Time2GraphicMap &outmap) |
Retrieves a guido staff graphic to time mapping, without any processing (RAW). More... | |
GuidoErrCode | GuidoGetRAWVoiceMap (CGRHandler gr, int pagenum, float w, float h, int voice, Time2GraphicMap &outmap) |
Retrieves a guido voice graphic to time mapping, without any processing (RAW). More... | |
GuidoErrCode | GuidoGetRAWSystemMap (CGRHandler gr, int pagenum, float w, float h, Time2GraphicMap &outmap) |
Retrieves a guido system graphic to time mapping, without any processing (RAW). More... | |
GuidoErrCode | GuidoGetPageMap (CGRHandler gr, int pagenum, float w, float h, Time2GraphicMap &outmap) |
Retrieves a guido page graphic to time mapping. More... | |
GuidoErrCode | GuidoGetStaffMap (CGRHandler gr, int pagenum, float w, float h, int staff, Time2GraphicMap &outmap) |
Retrieves a guido staff graphic to time mapping. New behaviour: if a rest is at a bar start, mapping is extended toward left barline. For old behaviour, use GuidoGetStaffMapV1. More... | |
GuidoErrCode | GuidoGetStaffMapV1 (CGRHandler gr, int pagenum, float w, float h, int staff, Time2GraphicMap &outmap) |
Retrieves a guido staff graphic to time mapping. To use the new behaviour, see GuidoGetStaffMap. More... | |
GuidoErrCode | GuidoGetVoiceMap (CGRHandler gr, int pagenum, float w, float h, int voice, Time2GraphicMap &outmap) |
Retrieves a guido voice graphic to time mapping. More... | |
GuidoErrCode | GuidoGetSystemMap (CGRHandler gr, int pagenum, float w, float h, Time2GraphicMap &outmap) |
Retrieves a guido system graphic to time mapping. New behaviour: if all staves have a rest at a same bar start, mapping is extended toward left barline. For old behaviour, use GuidoGetSystemMapV1. More... | |
GuidoErrCode | GuidoGetSystemMapV1 (CGRHandler gr, int pagenum, float w, float h, Time2GraphicMap &outmap) |
Retrieves a guido system graphic to time mapping. To use the new behaviour, see GuidoGetSystemMap. More... | |
bool | GuidoGetTime (const GuidoDate &date, const Time2GraphicMap map, TimeSegment &t, FloatRect &r) |
Retrieves a time segment and the associated graphic segment in a mapping. More... | |
bool | GuidoGetPoint (float x, float y, const Time2GraphicMap map, TimeSegment &t, FloatRect &r) |
Retrieves a time segment and the associated graphic segment in a mapping. More... | |
GuidoErrCode | GuidoGetSVGMap (GRHandler gr, int pagenum, GuidoElementSelector sel, std::vector< MapElement > &outMap) GUIDOAPI_deprecated |
Retrieves the graphic to time mapping corresponding to the SVG output. More... | |
GuidoErrCode | GuidoGetTimeMap (CARHandler ar, TimeMapCollector &f) |
Retrieves the rolled to unrolled time mapping. More... | |
Variables | |
class_export | TimeSegment |
a time segment definition and operations More... | |
class_export | GuidoDate |
print the time segment More... | |
typedef std::pair<FloatRect, RectInfos> MapElement |
typedef std::vector<TMapSegments> Time2GraphicMap |
typedef Time2GraphicMap::const_iterator Time2GraphicMapIterator |
typedef std::pair<TimeSegment, TimeSegment> TimeMapElement |
typedef std::pair<TimeSegment, FloatRect> TMapSegments |
typedef std::vector<TTimeMapSegments> TTime2TimeMap |
typedef std::pair<TimeSegment, TimeSegment> TTimeMapSegments |
enum GuidoElementSelector |
enum GuidoElementType |
float duration | ( | ) | const |
gives the segment duration
bool empty | ( | ) | const |
check for empty segment
GuidoErrCode GuidoGetMap | ( | CGRHandler | gr, |
int | pagenum, | ||
float | width, | ||
float | height, | ||
GuidoElementSelector | sel, | ||
MapCollector & | f | ||
) |
Retrieves the graphic to time mapping, without any processing (RAW)
gr | a Guido opaque handle to a GR structure. |
pagenum | a page index, starting from 1. |
width | the page width. |
height | the page height. |
sel | a GuidoElementSelector to filter undesired objects out. |
f | a MapCollector object that will be called for each selected element. |
GuidoErrCode GuidoGetPageMap | ( | CGRHandler | gr, |
int | pagenum, | ||
float | w, | ||
float | h, | ||
Time2GraphicMap & | outmap | ||
) |
Retrieves a guido page graphic to time mapping.
gr | a Guido opaque handle to a GR structure. |
pagenum | a page index, starting from 1. |
w | the page width. |
h | the page height. |
outmap | contains the mapping on output. |
bool GuidoGetPoint | ( | float | x, |
float | y, | ||
const Time2GraphicMap | map, | ||
TimeSegment & | t, | ||
FloatRect & | r | ||
) |
Retrieves a time segment and the associated graphic segment in a mapping.
x | a point x coordinate |
y | a point y coordinate |
map | a time to graphic map. |
r | on output, the graphic segment containing the point (note that segments are right and bottom opened) |
t | on output, the time segment associated to the graphic segment |
GuidoErrCode GuidoGetRAWStaffMap | ( | CGRHandler | gr, |
int | pagenum, | ||
float | w, | ||
float | h, | ||
int | staff, | ||
Time2GraphicMap & | outmap | ||
) |
Retrieves a guido staff graphic to time mapping, without any processing (RAW).
gr | a Guido opaque handle to a GR structure. |
pagenum | a page index, starting from 1. |
w | the page width. |
h | the page height. |
staff | the staff index (starting from 1). |
outmap | contains the mapping on output. |
GuidoErrCode GuidoGetRAWSystemMap | ( | CGRHandler | gr, |
int | pagenum, | ||
float | w, | ||
float | h, | ||
Time2GraphicMap & | outmap | ||
) |
Retrieves a guido system graphic to time mapping, without any processing (RAW).
gr | a Guido opaque handle to a GR structure. |
pagenum | a page index, starting from 1. |
w | the page width. |
h | the page height. |
outmap | contains the mapping on output. |
GuidoErrCode GuidoGetRAWVoiceMap | ( | CGRHandler | gr, |
int | pagenum, | ||
float | w, | ||
float | h, | ||
int | voice, | ||
Time2GraphicMap & | outmap | ||
) |
Retrieves a guido voice graphic to time mapping, without any processing (RAW).
gr | a Guido opaque handle to a GR structure. |
pagenum | a page index, starting from 1. |
w | the page width. |
h | the page height. |
voice | the voice index (starting from 1). |
outmap | contains the mapping on output. |
GuidoErrCode GuidoGetStaffMap | ( | CGRHandler | gr, |
int | pagenum, | ||
float | w, | ||
float | h, | ||
int | staff, | ||
Time2GraphicMap & | outmap | ||
) |
Retrieves a guido staff graphic to time mapping. New behaviour: if a rest is at a bar start, mapping is extended toward left barline. For old behaviour, use GuidoGetStaffMapV1.
gr | a Guido opaque handle to a GR structure. |
pagenum | a page index, starting from 1. |
w | the page width. |
h | the page height. |
staff | the staff index (starting from 1). |
outmap | contains the mapping on output. |
GuidoErrCode GuidoGetStaffMapV1 | ( | CGRHandler | gr, |
int | pagenum, | ||
float | w, | ||
float | h, | ||
int | staff, | ||
Time2GraphicMap & | outmap | ||
) |
Retrieves a guido staff graphic to time mapping. To use the new behaviour, see GuidoGetStaffMap.
gr | a Guido opaque handle to a GR structure. |
pagenum | a page index, starting from 1. |
w | the page width. |
h | the page height. |
staff | the staff index (starting from 1). |
outmap | contains the mapping on output. |
GuidoErrCode GuidoGetSVGMap | ( | GRHandler | gr, |
int | pagenum, | ||
GuidoElementSelector | sel, | ||
std::vector< MapElement > & | outMap | ||
) |
Retrieves the graphic to time mapping corresponding to the SVG output.
gr | a Guido opaque handle to a GR structure. |
pagenum | a page index, starting from 1. |
sel | GuidoElementSelector to filter undesired objects out. |
outMap | on output: a vector containing the map elements |
GuidoErrCode GuidoGetSystemMap | ( | CGRHandler | gr, |
int | pagenum, | ||
float | w, | ||
float | h, | ||
Time2GraphicMap & | outmap | ||
) |
Retrieves a guido system graphic to time mapping. New behaviour: if all staves have a rest at a same bar start, mapping is extended toward left barline. For old behaviour, use GuidoGetSystemMapV1.
gr | a Guido opaque handle to a GR structure. |
pagenum | a page index, starting from 1. |
w | the page width. |
h | the page height. |
outmap | contains the mapping on output. |
GuidoErrCode GuidoGetSystemMapV1 | ( | CGRHandler | gr, |
int | pagenum, | ||
float | w, | ||
float | h, | ||
Time2GraphicMap & | outmap | ||
) |
Retrieves a guido system graphic to time mapping. To use the new behaviour, see GuidoGetSystemMap.
gr | a Guido opaque handle to a GR structure. |
pagenum | a page index, starting from 1. |
w | the page width. |
h | the page height. |
outmap | contains the mapping on output. |
bool GuidoGetTime | ( | const GuidoDate & | date, |
const Time2GraphicMap | map, | ||
TimeSegment & | t, | ||
FloatRect & | r | ||
) |
Retrieves a time segment and the associated graphic segment in a mapping.
date | a date used to select the container time segment |
map | a time to graphic map. |
t | on output, the time segment containing the date (note that segments are right opened) |
r | on output, the graphic segment associated to the time segment |
GuidoErrCode GuidoGetTimeMap | ( | CARHandler | ar, |
TimeMapCollector & | f | ||
) |
Retrieves the rolled to unrolled time mapping.
gr | a Guido opaque handle to a GR structure. |
f | a TimeMapCollector object that will be called for each time segment. |
GuidoErrCode GuidoGetVoiceMap | ( | CGRHandler | gr, |
int | pagenum, | ||
float | w, | ||
float | h, | ||
int | voice, | ||
Time2GraphicMap & | outmap | ||
) |
Retrieves a guido voice graphic to time mapping.
gr | a Guido opaque handle to a GR structure. |
pagenum | a page index, starting from 1. |
w | the page width. |
h | the page height. |
voice | the voice index (starting from 1). |
outmap | contains the mapping on output. |
bool include | ( | const GuidoDate & | date | ) | const |
check for date inclusion
bool include | ( | const TimeSegment & | ts | ) | const |
check for segment inclusion
bool intersect | ( | const TimeSegment & | ts | ) | const |
check for segments intersection
TimeSegment operator& | ( | const TimeSegment & | ts | ) | const |
intersection operation (may return an arbitrary empty segment)
bool operator< | ( | const TimeSegment & | ts | ) | const |
order relationship: the smaller is the smaller first date
|
inline |
|
inline |
bool operator== | ( | const TimeSegment & | ts | ) | const |
bool startEqual | ( | const TimeSegment & | ts | ) | const |
check if start date is the same
print the time segment
class_export TimeSegment |
a time segment definition and operations