Functions

Building abstract and graphic representations
[Guido Engine Adapter]

Functions

GuidoErrCode init (GuidoInitDesc *desc)
 Initialises the Guido Engine. Must be called before any attempt to read a Guido file or to use the Guido Factory.
GuidoErrCode init ()
 Initialise the Guido Engine with a internal SVGSystem and SVGDevice. This system and device have embind font metrics. They are used to calculate score in environnement without font metrics like javascript.
void shutdown ()
 Guido Engine shutdown.
GRHandler ar2gr (ARHandler ar)
 Transforms a Guido abstract representation into a Guido graphic representation. The engine applies layout algorithms according to the settings given as argument. Default settings are applied.
GRHandler ar2gr (ARHandler ar, const GuidoLayoutSettings &settings)
 Transforms a Guido abstract representation into a Guido graphic representation. The engine applies layout algorithms according to the settings given as argument.
GuidoErrCode updateGR (GRHandler gr)
 Applies new layout settings to an existing Guido graphic representation. Default settings are applied.
GuidoErrCode updateGR (GRHandler gr, const GuidoLayoutSettings &settings)
 Applies new layout settings to an existing Guido graphic representation.
void freeAR (ARHandler ar)
 Releases a Guido abstract representation. This method must be called after freeGR.
void freeGR (GRHandler gr)
 Releases a Guido graphic representation. Don't release the ARHandler refenrece in the GRHandler before release the GR.
std::string getErrorString (GuidoErrCode errCode)
 Gives a textual description of a Guido error code.
GuidoLayoutSettings getDefaultLayoutSettings ()
 Gives the default values of the layout settings.

Function Documentation

GuidoErrCode init ( GuidoInitDesc desc ) [inherited]

Initialises the Guido Engine. Must be called before any attempt to read a Guido file or to use the Guido Factory.

Parameters:
descthe graphic environment description.
Returns:
a Guido error code.

WARNING: the caller must ensure desc maintains a constant reference on a valid VGDevice, because Guido keeps it internally (to calculate fonts, etc.)

GuidoErrCode init (  ) [inherited]

Initialise the Guido Engine with a internal SVGSystem and SVGDevice. This system and device have embind font metrics. They are used to calculate score in environnement without font metrics like javascript.

void shutdown (  ) [inherited]

Guido Engine shutdown.

Actually release the font allocated by the engine. Anyway, the fonts are release when the client application exit but the function provides control over the time of the release.

GRHandler ar2gr ( ARHandler  ar ) [inherited]

Transforms a Guido abstract representation into a Guido graphic representation. The engine applies layout algorithms according to the settings given as argument. Default settings are applied.

Note:
You can safely free the AR after the transformation.
Parameters:
arthe handler to the abstract representation.
Returns:
a Guido opaque handle to a graphic music representation. It's the caller responsability to free the handle using freeGR.
GRHandler ar2gr ( ARHandler  ar,
const GuidoLayoutSettings settings 
) [inherited]

Transforms a Guido abstract representation into a Guido graphic representation. The engine applies layout algorithms according to the settings given as argument.

Note:
You can safely free the AR after the transformation.
Parameters:
arthe handler to the abstract representation.
settingsa pointer to the settings for the graphic layout.
Returns:
a Guido opaque handle to a graphic music representation. It's the caller responsability to free the handle using freeGR.
GuidoErrCode updateGR ( GRHandler  gr ) [inherited]

Applies new layout settings to an existing Guido graphic representation. Default settings are applied.

Parameters:
grthe handler to the graphic representation.
Returns:
a Guido error code.
GuidoErrCode updateGR ( GRHandler  gr,
const GuidoLayoutSettings settings 
) [inherited]

Applies new layout settings to an existing Guido graphic representation.

Parameters:
grthe handler to the graphic representation.
settingsthe settings for the graphic layout.
Returns:
a Guido error code.
void freeAR ( ARHandler  ar ) [inherited]

Releases a Guido abstract representation. This method must be called after freeGR.

Parameters:
arthe handler to the abstract representation.
void freeGR ( GRHandler  gr ) [inherited]

Releases a Guido graphic representation. Don't release the ARHandler refenrece in the GRHandler before release the GR.

Parameters:
grthe handler to the graphic representation.
std::string getErrorString ( GuidoErrCode  errCode ) [inherited]

Gives a textual description of a Guido error code.

Parameters:
errCodea Guido error code.
Returns:
a string describing the error.
GuidoLayoutSettings getDefaultLayoutSettings (  ) [inherited]

Gives the default values of the layout settings.

Returns:
the settings fill with default values.