GUIDOLib
1.7.7
A Music Score Rendering Engine
|
Go to the documentation of this file. 1 #ifndef GUIDOENGINEADAPTER_H 2 #define GUIDOENGINEADAPTER_H 296 std::string
gr2SVG(
const GRHandler handle,
int page, std::ostream& out,
int w,
int h,
bool embedFont =
true );
308 GuidoErrCode gr2SVG(
const GRHandler handle,
int page, std::ostream& out,
bool embedFont =
true,
const char* font = 0,
const int mappingMode = 0 );
318 std::string
gr2SVG(
const GRHandler handle,
int page,
bool embedfont =
true,
const int mappingMode = 0);
507 unsigned char red,
unsigned char green,
unsigned char blue );
598 std::string
getStream(
const GuidoStream *gStream)
const;
669 #endif // GUIDOENGINEADAPTER_H
GuidoErrCode onDraw(GuidoOnDrawDesc *desc)
Draws one page of score into a graphic device.
float unit2Inches(float val)
Converts internal Guido units into inches.
float cm2Unit(float val)
Converts centimeters into internal Guido units.
std::string getVersionStr()
A data structure containing all information required by GuidoInit()
Definition: GUIDOEngine.h:49
int countVoices(CARHandler inHandleAR)
Gives the number of score pages of the graphic representation.
GuidoErrCode init(GuidoInitDesc *desc)
Initialises the Guido Engine. Must be called before any attempt to read a Guido file or to use the Gu...
GRHandler ar2gr(ARHandler ar)
Transforms a Guido abstract representation into a Guido graphic representation. The engine applies la...
Contains all graphic-related information required by GuidoOnDraw()
Definition: GUIDOEngine.h:152
float getLineSpace()
Gives the distance between two staff lines.
GuidoErrCode closeStream(GuidoStream *s)
Close a guido stream.
GuidoStream * openStream()
Open a guido stream.
void freeGR(GRHandler gr)
Releases a Guido graphic representation. Don't release the ARHandler refenrece in the GRHandler befor...
ARHandler file2AR(GuidoParser *parser, const std::string &file)
Parse a file and create the corresponding AR.
GuidoDate duration(CGRHandler inHandleGR)
Returns the music duration of a score.
GuidoErrCode setSymbolPath(ARHandler inHandleAR, const std::vector< std::string > &inPaths)
Makes the correspondance between an ARMusic and a path.
GuidoErrCode resizePageToMusic(GRHandler inHandleGR)
Resize the page sizes to the music size.
GuidoErrCode binaryExport(const GRHandler handle, int page, std::ostream &out)
Exports an representation of GUIDO draw commands in a data-reduced dsl.
GuidoDate getPageDate(CGRHandler inHandleGR, int pageNum)
Gives the time location of a Page.
GuidoVersion getVersion()
Gives the library version number as three integers.
The page format parameters.
Definition: GUIDOEngine.h:316
GuidoErrCode markVoice(ARHandler inHandleAR, int voicenum, const GuidoDate &date, const GuidoDate &duration, unsigned char red, unsigned char green, unsigned char blue)
Gives a color to all notes of a voice between a given time interval.
long getAR2GRTime(const GRHandler gr)
Gets AR to GR procedure time.
long getOnDrawTime(const GRHandler gr)
Gets GR drawing procedure time.
void shutdown()
Guido Engine shutdown.
const struct NodeGR * CGRHandler
Definition: GUIDOEngine.h:39
GuidoErrCode writeStream(GuidoStream *s, const std::string &str)
Write data to the stream.
long getParsingTime(const ARHandler ar)
Gets parsing time.
GuidoErrCode abstractExport(const GRHandler handle, int page, std::ostream &out)
Exports an abstract representation of GUIDO draw commands.
class_export GuidoEngineAdapter
Definition: GUIDOEngineAdapter.h:64
GuidoErrCode updateGR(GRHandler gr)
Applies new layout settings to an existing Guido graphic representation. Default settings are applied...
std::string str
String representation of guido version.
Definition: GUIDOEngineAdapter.h:47
ARHandler string2AR(GuidoParser *parser, const std::string &gmnCode)
Parse a string and create the corresponding AR.
GuidoErrCode checkVersionNums(int major, int minor, int sub)
Checks a required library version number.
GuidoErrCode ar2gmn(ARHandler ar, std::ostream &to)
Print a Guido abstract representation to a stream formatted as gmn code.
void setDrawBoundingBoxes(int bbMap)
Control bounding boxes drawing.
GuidoErrCode
The guido error codes list.
Definition: GUIDOEngine.h:211
void setDefaultPageFormat(const GuidoPageFormat &format)
Sets the default score page format.
std::string getErrorString(GuidoErrCode errCode)
Gives a textual description of a Guido error code.
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.
int sub
sub sub number version
Definition: GUIDOEngineAdapter.h:45
Representation of a date as a rational value.
Definition: GUIDOEngine.h:83
std::string getStream(const GuidoStream *gStream) const
returns the string of the stream
int getPageCount(CGRHandler inHandleGR)
Gives the number of score pages of the graphic representation.
std::string msg
msg a string that will contain the error message
Definition: GUIDOEngineAdapter.h:33
GuidoErrCode showElement(GRHandler gr, int elt, bool status)
GuidoPageFormat getDefaultPageFormat()
Gives the default score page format.
int getSystemCount(CGRHandler inHandleGR, int page)
Gives the number of systems on a given page.
GuidoLayoutSettings getDefaultLayoutSettings()
Gives the default values of the layout settings.
Engine settings for the graphic score layout.
Definition: GUIDOEngine.h:255
struct NodeGR * GRHandler
Definition: GUIDOEngine.h:37
GuidoErrCode closeParser(GuidoParser *p)
Close a guido parser and releases all the associated ressources.
int col
col a reference that will contain a column number in case of syntax error
Definition: GUIDOEngineAdapter.h:31
std::vector< std::string > getSymbolPath(const ARHandler inHandleAR)
Returns the path corresponding to an AR.
std::string gr2SVGColored(const GRHandler handle, int page, int r, int g, int b, bool embedfont=true)
Exports one page of score to SVG.
GuidoPageFormat getPageFormat(CGRHandler inHandleGR, int pageNum)
Gives a score page format.
ParserError parserGetErrorCode(GuidoParser *p)
Get the error syntax line/column/message.
virtual ~GuidoEngineAdapter()
~GuidoEngineAdapter
ARHandler stream2AR(GuidoParser *p, GuidoStream *stream)
Parse a stream and create the corresponding AR.
A structure for parser error.
Definition: GUIDOEngineAdapter.h:27
int major
major major number version
Definition: GUIDOEngineAdapter.h:41
struct NodeAR * ARHandler
Definition: GUIDOEngine.h:36
#define class_export
Definition: GUIDOExport.h:38
void freeAR(ARHandler ar)
Releases a Guido abstract representation. This method must be called after freeGR.
GuidoParser * openParser()
Creates a new parser.
int minor
minor minor number version
Definition: GUIDOEngineAdapter.h:43
int getDrawBoundingBoxes()
Gives bounding boxes drawing state.
int line
line a reference that will contain a line number in case of syntax error
Definition: GUIDOEngineAdapter.h:29
GuidoErrCode resetStream(GuidoStream *s)
Erase all stream content in order to reuse it.
float inches2Unit(float val)
Converts inches into internal Guido units.
const struct NodeAR * CARHandler
Definition: GUIDOEngine.h:38
float unit2CM(float val)
Converts internal Guido units into centimeters.
int findEventPage(CGRHandler inHandleGR, const GuidoDate &date)
Finds the page which has an event (note or rest) at a given date.
int findPageAt(CGRHandler inHandleGR, const GuidoDate &date)
Finds the page which contain a given date.
A structure for guido version, composed of 3 digit.
Definition: GUIDOEngineAdapter.h:39