GUIDOLib
1.7.7
A Music Score Rendering Engine
|
A C++ interface to the Guido Engine API. More...
Modules | |
Building abstract and graphic representations | |
Miscellaneous | |
Timing measurements | |
Parsing GMN files, strings and guido streams | |
Functions | |
virtual | ~GuidoEngineAdapter () |
~GuidoEngineAdapter More... | |
Variables | |
class_export | GuidoEngineAdapter |
int | countVoices (CARHandler inHandleAR) |
Gives the number of score pages of the graphic representation. More... | |
int | getPageCount (CGRHandler inHandleGR) |
Gives the number of score pages of the graphic representation. More... | |
int | getSystemCount (CGRHandler inHandleGR, int page) |
Gives the number of systems on a given page. More... | |
GuidoDate | duration (CGRHandler inHandleGR) |
Returns the music duration of a score. More... | |
int | findEventPage (CGRHandler inHandleGR, const GuidoDate &date) |
Finds the page which has an event (note or rest) at a given date. More... | |
int | findPageAt (CGRHandler inHandleGR, const GuidoDate &date) |
Finds the page which contain a given date. More... | |
GuidoDate | getPageDate (CGRHandler inHandleGR, int pageNum) |
Gives the time location of a Page. More... | |
GuidoErrCode | onDraw (GuidoOnDrawDesc *desc) |
Draws one page of score into a graphic device. More... | |
std::string | gr2SVG (const GRHandler handle, int page, std::ostream &out, int w, int h, bool embedFont=true) |
Exports one page of score to SVG. More... | |
GuidoErrCode | gr2SVG (const GRHandler handle, int page, std::ostream &out, bool embedFont=true, const char *font=0, const int mappingMode=0) |
Exports one page of score to SVG. More... | |
std::string | gr2SVG (const GRHandler handle, int page, bool embedfont=true, const int mappingMode=0) |
Exports one page of score to SVG. More... | |
std::string | gr2SVGColored (const GRHandler handle, int page, int r, int g, int b, bool embedfont=true) |
Exports one page of score to SVG. More... | |
GuidoErrCode | abstractExport (const GRHandler handle, int page, std::ostream &out) |
Exports an abstract representation of GUIDO draw commands. More... | |
std::string | abstractExport (const GRHandler handle, int page) |
Exports an abstract representation of GUIDO draw commands. More... | |
GuidoErrCode | binaryExport (const GRHandler handle, int page, std::ostream &out) |
Exports an representation of GUIDO draw commands in a data-reduced dsl. More... | |
std::string | binaryExport (const GRHandler handle, int page) |
Exports an representation of GUIDO draw commands in a data-reduced dsl. More... | |
void | setDrawBoundingBoxes (int bbMap) |
Control bounding boxes drawing. More... | |
int | getDrawBoundingBoxes () |
Gives bounding boxes drawing state. More... | |
GuidoPageFormat | getPageFormat (CGRHandler inHandleGR, int pageNum) |
Gives a score page format. More... | |
void | setDefaultPageFormat (const GuidoPageFormat &format) |
Sets the default score page format. More... | |
GuidoPageFormat | getDefaultPageFormat () |
Gives the default score page format. More... | |
float | unit2CM (float val) |
Converts internal Guido units into centimeters. More... | |
float | cm2Unit (float val) |
Converts centimeters into internal Guido units. More... | |
float | unit2Inches (float val) |
Converts internal Guido units into inches. More... | |
float | inches2Unit (float val) |
Converts inches into internal Guido units. More... | |
GuidoErrCode | resizePageToMusic (GRHandler inHandleGR) |
Resize the page sizes to the music size. More... | |
A C++ interface to the Guido Engine API.
std::string abstractExport | ( | const GRHandler | handle, |
int | page | ||
) |
Exports an abstract representation of GUIDO draw commands.
handle | a graphic representation. |
page | the page number. |
GuidoErrCode abstractExport | ( | const GRHandler | handle, |
int | page, | ||
std::ostream & | out | ||
) |
Exports an abstract representation of GUIDO draw commands.
handle | a graphic representation. |
page | the page number. |
out | the output stream. |
std::string binaryExport | ( | const GRHandler | handle, |
int | page | ||
) |
Exports an representation of GUIDO draw commands in a data-reduced dsl.
handle | a graphic representation. |
page | the page number. |
GuidoErrCode binaryExport | ( | const GRHandler | handle, |
int | page, | ||
std::ostream & | out | ||
) |
Exports an representation of GUIDO draw commands in a data-reduced dsl.
handle | a graphic representation. |
page | the page number. |
out | the output stream. |
float cm2Unit | ( | float | val | ) |
Converts centimeters into internal Guido units.
val | the value to be converted |
int countVoices | ( | CARHandler | inHandleAR | ) |
Gives the number of score pages of the graphic representation.
\addtogroup Pages2 Browsing music pages \ingroup EngineAdapter The Guido Engine produces pages of music and therefore, the graphic representation consists in a collection of pages. The following functions are intended to access these pages by page number as well as by date. Page numbers start at 1.
inHandleAR | a Guido opaque handle to a AR structure. |
GuidoDate duration | ( | CGRHandler | inHandleGR | ) |
Returns the music duration of a score.
The duration is expressed as a fractional value where 1 represents a whole note.
inHandleGR | a Guido opaque handle to a GR structure. |
int findEventPage | ( | CGRHandler | inHandleGR, |
const GuidoDate & | date | ||
) |
Finds the page which has an event (note or rest) at a given date.
inHandleGR | a Guido opaque handle to a GR structure. |
date | the target date. |
int findPageAt | ( | CGRHandler | inHandleGR, |
const GuidoDate & | date | ||
) |
Finds the page which contain a given date.
inHandleGR | a Guido opaque handle to a GR structure. |
date | the target date. |
GuidoPageFormat getDefaultPageFormat | ( | ) |
Gives the default score page format.
int getDrawBoundingBoxes | ( | ) |
Gives bounding boxes drawing state.
int getPageCount | ( | CGRHandler | inHandleGR | ) |
Gives the number of score pages of the graphic representation.
inHandleGR | a Guido opaque handle to a GR structure. |
GuidoDate getPageDate | ( | CGRHandler | inHandleGR, |
int | pageNum | ||
) |
Gives the time location of a Page.
inHandleGR | a Guido opaque handle to a GR structure. |
pageNum | a page number (starts at 1). |
GuidoPageFormat getPageFormat | ( | CGRHandler | inHandleGR, |
int | pageNum | ||
) |
Gives a score page format.
inHandleGR | a Guido opaque handle to a GR structure. |
pageNum | a page number. |
int getSystemCount | ( | CGRHandler | inHandleGR, |
int | page | ||
) |
Gives the number of systems on a given page.
inHandleGR | a Guido opaque handle to a GR structure. |
page | a page number (starts at 1). |
std::string gr2SVG | ( | const GRHandler | handle, |
int | page, | ||
bool | embedfont = true , |
||
const int | mappingMode = 0 |
||
) |
Exports one page of score to SVG.
handle | a graphic representation. |
page | the page number. |
embedfont | a boolean value. When true, the default svg guido font is embedded to the SVG. |
mappingMode | a constant to embed a mapping |
GuidoErrCode gr2SVG | ( | const GRHandler | handle, |
int | page, | ||
std::ostream & | out, | ||
bool | embedFont = true , |
||
const char * | font = 0 , |
||
const int | mappingMode = 0 |
||
) |
Exports one page of score to SVG.
handle | a graphic representation. |
page | the page number. |
out | the output stream. |
embedFont | a boolean value. When true, the default svg guido font is embedded to the SVG. |
font | path of the guido svg font file (ignored when embedFont is true ) |
mappingMode | a constant to embed a mapping |
std::string gr2SVG | ( | const GRHandler | handle, |
int | page, | ||
std::ostream & | out, | ||
int | w, | ||
int | h, | ||
bool | embedFont = true |
||
) |
Exports one page of score to SVG.
handle | a graphic representation. |
page | the page number. |
out | the output stream. |
w | the drawing area width. |
h | the drawing area height. |
embedFont | a boolean value. When true, the default svg guido font is embedded to the SVG. |
std::string gr2SVGColored | ( | const GRHandler | handle, |
int | page, | ||
int | r, | ||
int | g, | ||
int | b, | ||
bool | embedfont = true |
||
) |
Exports one page of score to SVG.
handle | a graphic representation. |
page | the page number. |
r | the color red component |
g | the color green component |
b | the color blue component |
embedfont | a boolean value. When true, the default svg guido font is embedded to the SVG. |
float inches2Unit | ( | float | val | ) |
Converts inches into internal Guido units.
val | the value to be converted |
GuidoErrCode onDraw | ( | GuidoOnDrawDesc * | desc | ) |
Draws one page of score into a graphic device.
\addtogroup Format2 Score drawing and pages formating \ingroup EngineAdapter The GuidoEngine makes use of internal units for graphic operations. The functions that query or set graphic dimensions always makes use of this internal unit. Conversion functions are provided to convert to standard units.
desc | informations about what to draw and how to draw. |
GuidoErrCode resizePageToMusic | ( | GRHandler | inHandleGR | ) |
Resize the page sizes to the music size.
inHandleGR | a Guido opaque handle to a GR structure. |
void setDefaultPageFormat | ( | const GuidoPageFormat & | format | ) |
Sets the default score page format.
The default page format is used when no \pageFormat
tag is present. Parameters are Guido internal units. Default values for the default page format are:
format | the page format |
void setDrawBoundingBoxes | ( | int | bbMap | ) |
Control bounding boxes drawing.
bbMap | a bits field indicating the set of bounding boxes to draw (default to none). |
float unit2CM | ( | float | val | ) |
Converts internal Guido units into centimeters.
val | the value to be converted |
float unit2Inches | ( | float | val | ) |
Converts internal Guido units into inches.
val | the value to be converted |
|
virtual |
~GuidoEngineAdapter
class_export GuidoEngineAdapter |