GUIDOLib  1.7.7
A Music Score Rendering Engine
Functions
Score drawing and pages formating

Functions

GuidoErrCode GuidoOnDraw (GuidoOnDrawDesc *desc)
 Draws one page of score into a graphic device. More...
 
GuidoErrCode GuidoGR2SVG (const GRHandler handle, int page, std::ostream &out, bool embedFont, const char *font, const int mappingMode=0)
 Exports one page of score to SVG. More...
 
GuidoErrCode GuidoGR2SVG1 (const GRHandler handle, int page, std::ostream &out, int width, int height, bool embedFont)
 Exports one page of score to SVG. More...
 
GuidoErrCode GuidoGR2SVGColored (const GRHandler handle, int page, std::ostream &out, const VGColor &color, bool embedFont)
 Exports one page of score to SVG. More...
 
GuidoErrCode GuidoSVGExport (const GRHandler handle, int page, std::ostream &out, const char *fontfile, const int mappingMode=0) GUIDOAPI_deprecated
 Exports one page of score to SVG. More...
 
GuidoErrCode GuidoSVGExportWithFontSpec (const GRHandler handle, int page, std::ostream &out, const char *fontfile, const char *fontspec, const int mappingMode=0) GUIDOAPI_deprecated
 Exports one page of score to SVG. If fontfile or fontspec are set, the font is added to svg. The fontfile has priority over the fontspec. More...
 
GuidoErrCode GuidoAbstractExport (const GRHandler handle, int page, std::ostream &out)
 Exports an abstract representation of GUIDO draw commands. More...
 
GuidoErrCode GuidoBinaryExport (const GRHandler handle, int page, std::ostream &out)
 Exports an representation of GUIDO draw commands in a data-reduced dsl. More...
 
void GuidoDrawBoundingBoxes (int bbMap)
 Control bounding boxes drawing. More...
 
int GuidoGetDrawBoundingBoxes ()
 Gives bounding boxes drawing state. More...
 
void GuidoGetPageFormat (CGRHandler inHandleGR, int pageNum, GuidoPageFormat *format)
 Gives a score page format. More...
 
void GuidoSetDefaultPageFormat (const GuidoPageFormat *format)
 Sets the default score page format. More...
 
void GuidoGetDefaultPageFormat (GuidoPageFormat *format)
 Gives the default score page format. More...
 
void GuidoSetStaffSize (CGRHandler inHandleGR, int staffNum, float size)
 Gives the staves size (one staff at a time). Staff will have given size until a \staffFormat tag with "size" param is defined. Size should be given in internal units. To convert from cm or inches you should use GuidoCM2Unit or GuidoInches2Unit. More...
 
float GuidoGetStaffSize (CGRHandler inHandleGR, int staffNum)
 Get the staff size of given staff number. More...
 
float GuidoUnit2CM (float val)
 Converts internal Guido units into centimeters. More...
 
float GuidoCM2Unit (float val)
 Converts centimeters into internal Guido units. More...
 
float GuidoUnit2Inches (float val)
 Converts internal Guido units into inches. More...
 
float GuidoInches2Unit (float val)
 Converts inches into internal Guido units. More...
 
GuidoErrCode GuidoResizePageToMusic (GRHandler inHandleGR)
 Resize the page sizes to the music size. More...
 

Detailed Description

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.

Function Documentation

◆ GuidoAbstractExport()

GuidoErrCode GuidoAbstractExport ( const GRHandler  handle,
int  page,
std::ostream &  out 
)

Exports an abstract representation of GUIDO draw commands.

Parameters
handlea graphic representation.
pagethe page number.
outthe output stream.
Returns
a Guido error code

◆ GuidoBinaryExport()

GuidoErrCode GuidoBinaryExport ( const GRHandler  handle,
int  page,
std::ostream &  out 
)

Exports an representation of GUIDO draw commands in a data-reduced dsl.

Parameters
handlea graphic representation.
pagethe page number.
outthe output stream.
Returns
a Guido error code

◆ GuidoCM2Unit()

float GuidoCM2Unit ( float  val)

Converts centimeters into internal Guido units.

Parameters
valthe value to be converted
Returns
the converted value

◆ GuidoDrawBoundingBoxes()

void GuidoDrawBoundingBoxes ( int  bbMap)

Control bounding boxes drawing.

Parameters
bbMapa bits field indicating the set of bounding boxes to draw (default to none).

◆ GuidoGetDefaultPageFormat()

void GuidoGetDefaultPageFormat ( GuidoPageFormat format)

Gives the default score page format.

Parameters
formaton output: the page format

◆ GuidoGetDrawBoundingBoxes()

int GuidoGetDrawBoundingBoxes ( )

Gives bounding boxes drawing state.

◆ GuidoGetPageFormat()

void GuidoGetPageFormat ( CGRHandler  inHandleGR,
int  pageNum,
GuidoPageFormat format 
)

Gives a score page format.

Parameters
inHandleGRa Guido opaque handle to a GR structure.
pageNuma page number.
formaton output: the page format

◆ GuidoGetStaffSize()

float GuidoGetStaffSize ( CGRHandler  inHandleGR,
int  staffNum 
)

Get the staff size of given staff number.

Returns
the staff size in internal units (-1 if not defined).

◆ GuidoGR2SVG()

GuidoErrCode GuidoGR2SVG ( const GRHandler  handle,
int  page,
std::ostream &  out,
bool  embedFont,
const char *  font,
const int  mappingMode = 0 
)

Exports one page of score to SVG.

Parameters
handlea graphic representation.
pagethe page number.
outthe output stream.
embedFonta boolean value. When true, the default svg guido font is embedded to the SVG.
fontpath of the guido svg font file (ignored when embedFont is true)
mappingModethe mapping mode
See also
GuidoMapping.
Returns
a Guido error code

◆ GuidoGR2SVG1()

GuidoErrCode GuidoGR2SVG1 ( const GRHandler  handle,
int  page,
std::ostream &  out,
int  width,
int  height,
bool  embedFont 
)

Exports one page of score to SVG.

Parameters
handlea graphic representation.
pagethe page number.
outthe output stream.
widththe drawing area width.
heightthe drawing area height.
embedFonta boolean value. When true, the default svg guido font is embedded to the SVG.
Returns
a Guido error code

◆ GuidoGR2SVGColored()

GuidoErrCode GuidoGR2SVGColored ( const GRHandler  handle,
int  page,
std::ostream &  out,
const VGColor color,
bool  embedFont 
)

Exports one page of score to SVG.

Parameters
handlea graphic representation.
pagethe page number.
outthe output stream.
colorthe score color.
embedFonta boolean value. When true, the default svg guido font is embedded to the SVG.
Returns
a Guido error code

◆ GuidoInches2Unit()

float GuidoInches2Unit ( float  val)

Converts inches into internal Guido units.

Parameters
valthe value to be converted
Returns
the converted value

◆ GuidoOnDraw()

GuidoErrCode GuidoOnDraw ( GuidoOnDrawDesc desc)

Draws one page of score into a graphic device.

Parameters
descinformations about what to draw and how to draw.
Returns
a Guido error code

◆ GuidoResizePageToMusic()

GuidoErrCode GuidoResizePageToMusic ( GRHandler  inHandleGR)

Resize the page sizes to the music size.

Parameters
inHandleGRa Guido opaque handle to a GR structure.
Returns
a Guido error code.

◆ GuidoSetDefaultPageFormat()

void GuidoSetDefaultPageFormat ( 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:

  • paper size: A4
  • left margin: 2cm
  • right margin: 2cm
  • top margin: 5cm
  • bottom margin: 3cm
Parameters
formatthe page format

◆ GuidoSetStaffSize()

void GuidoSetStaffSize ( CGRHandler  inHandleGR,
int  staffNum,
float  size 
)

Gives the staves size (one staff at a time). Staff will have given size until a \staffFormat tag with "size" param is defined. Size should be given in internal units. To convert from cm or inches you should use GuidoCM2Unit or GuidoInches2Unit.

Parameters
inHandleGRa Guido opaque handle to a GR structure.
staffNumthe staff number on which will be applied new size scale
sizethe staff size in internal units. A negative value resets the staff size.

◆ GuidoSVGExport()

GuidoErrCode GuidoSVGExport ( const GRHandler  handle,
int  page,
std::ostream &  out,
const char *  fontfile,
const int  mappingMode = 0 
)

Exports one page of score to SVG.

Parameters
handlea graphic representation.
pagethe page number.
outthe output stream.
fontfilepath of the guido svg font file.
mappingModethe mapping mode (see mapping mode enum).
Returns
a Guido error code

◆ GuidoSVGExportWithFontSpec()

GuidoErrCode GuidoSVGExportWithFontSpec ( const GRHandler  handle,
int  page,
std::ostream &  out,
const char *  fontfile,
const char *  fontspec,
const int  mappingMode = 0 
)

Exports one page of score to SVG. If fontfile or fontspec are set, the font is added to svg. The fontfile has priority over the fontspec.

Parameters
handlea graphic representation.
pagethe page number.
outthe output stream.
fontfilepath of the guido svg font file.
fontspecan svg font in text representation.
mappingModethe mapping mode (see mapping mode enum).
Returns
a Guido error code

◆ GuidoUnit2CM()

float GuidoUnit2CM ( float  val)

Converts internal Guido units into centimeters.

Parameters
valthe value to be converted
Returns
the converted value

◆ GuidoUnit2Inches()

float GuidoUnit2Inches ( float  val)

Converts internal Guido units into inches.

Parameters
valthe value to be converted
Returns
the converted value

Guido Project Copyright © 2019 Grame-CNCM