// Graphics primitves

void graphicsBeginPage( GraphicsContext cx );
void graphicsEndPage( GraphicsContext cx );
void graphicsMoveTo( GraphicsContext cx, float x, float y );
void graphicsLineTo( GraphicsContext cx, float x, float y );
void graphicsCurveTo( GraphicsContext cx, float x1, float y1, float x2, float y2, float x3, float y3 );
void graphicsAddArc( GraphicsContext cx, float x, float y, float radius, float startAngle, float endAngle );
void graphicsNewPath( GraphicsContext cx );
void graphicsClosePath( GraphicsContext cx );
void graphicsSetLineWidth( GraphicsContext cx, float w );
void graphicsFill( GraphicsContext cx );
void graphicsStroke( GraphicsContext cx );
void graphicsSave( GraphicsContext cx );
void graphicsRestore( GraphicsContext cx );
void graphicsTranslate( GraphicsContext cx, float x, float y );
void graphicsScale( GraphicsContext cx, float x, float y );
void graphicsSetFont( GraphicsContext cx, int font, int size );
void graphicsDrawText( GraphicsContext cx, float x, float y, const char *text, int alignment );
void graphicsFlushBuffer( GraphicsContext cx, const char* buffer, int start, int end );

// Music typesetting functions

extern void cgcshow( GraphicsContext cx, float x, float y, const char *s );
extern void cglshow( GraphicsContext cx, float x, float y, const char *s );
extern void cgrshow( GraphicsContext cx, float x, float y, const char *s );
extern void cgwd( GraphicsContext cx, const char *s, float x, float y );
extern void cgwhf( GraphicsContext cx, float x, float y );
extern void cgwln( GraphicsContext cx, float x1, float x2, float y );
extern void drawTimeSignature( GraphicsContext cx, float x, const char *top, int bottom );
extern void drawStemUp( GraphicsContext fp, float x, float y, float u );
extern void drawStemDown( GraphicsContext fp, float x, float y, float u );
extern void drawDot( GraphicsContext fp, float x, float y, float dx, float dy );
extern void drawHat( GraphicsContext fp, float x, float y );
extern void drawAtt( GraphicsContext fp, float x, float y );
extern void drawRollDown( GraphicsContext cx, float x, float y );
extern void drawRollUp( GraphicsContext cx, float x, float y );
extern void drawSlide( GraphicsContext cx, float x, float y, float dy );
extern void drawTrill( GraphicsContext cx, float x, float y );
extern void drawGracing( GraphicsContext cx, float x, float y );
extern void drawStaccato( GraphicsContext cx, float x, float y );
extern void drawBarMark( GraphicsContext cx, float x, float y );
extern void drawHold( GraphicsContext cx, float x, float y );
extern void drawUpBow( GraphicsContext cx, float x, float y );
extern void drawDownBow( GraphicsContext cx, float x, float y );
extern void drawHorizontalLine( GraphicsContext cx, float x, float y );
extern void cghl1( GraphicsContext cx, float x, float y );
extern void cgbm( GraphicsContext cx, float x1, float y1, float x2, float y2, float t );
extern void cgbnum( GraphicsContext cx, float x, float y, int n );
extern void cghbr( GraphicsContext cx, float x1, float y1, float x2, float y2 );
extern void drawFlag( GraphicsContext cx, float x, float y, float len, int s, char du );
extern void drawSharpSign0( GraphicsContext cx, float x, float y );
extern void drawSharpSign( GraphicsContext cx, float x, float y, float dx );
extern void drawFlatSign0( GraphicsContext cx, float x, float y );
extern void drawFlatSign( GraphicsContext cx, float x, float y, float dx );
extern void cgftx( GraphicsContext cx, float x, float y );
extern void cgdft0( GraphicsContext cx, float x, float y );
extern void drawNaturalSign0( GraphicsContext cx, float x, float y );
extern void drawNaturalSign( GraphicsContext cx, float x, float y, float dx );
extern void drawRest1( GraphicsContext cx, float x, float y );
extern void drawRest2( GraphicsContext cx, float x, float y );
extern void drawRest4( GraphicsContext cx, float x, float y );
extern void drawRest8( GraphicsContext cx, float x, float y );
extern void drawRest16( GraphicsContext cx, float x, float y );
extern void drawRest32( GraphicsContext cx, float x, float y );
extern void drawRest64( GraphicsContext cx, float x, float y );
extern void drawBarLine( GraphicsContext cx, float x, float y );
extern void cgdbar( GraphicsContext cx, float x, float y );
extern void cgfbar1( GraphicsContext cx, float x, float y );
extern void cgfbar2( GraphicsContext cx, float x, float y );
extern void drawRepeatDots( GraphicsContext cx, float x, float y );
extern void cgend1( GraphicsContext cx, float x1, float x2, int n );
extern void cgend2( GraphicsContext cx, float x1, float x2, int n );
extern void cggc( GraphicsContext cx, float x, float y, const char *text );
extern void cgsl( GraphicsContext cx,
  float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4,
  float x5, float y5, float x6, float y6, float x7, float y7, float x8, float y8
);
extern void cghd( GraphicsContext cx, float x, float y );
extern void cgHd( GraphicsContext cx, float x, float y );
extern void cgHD( GraphicsContext cx, float x, float y );
extern void cgghl( GraphicsContext cx, float x, float y );
extern void cggnt( GraphicsContext cx, float x, float y, float l );
extern void cggn1( GraphicsContext cx, float x, float y, float l );
extern void cggsh0( GraphicsContext cx, float x, float y );
extern void cggft0( GraphicsContext cx, float x, float y );
extern void cggnt0( GraphicsContext cx, float x, float y );
extern void cggdf0( GraphicsContext cx, float x, float y );
extern void cggds0( GraphicsContext cx, float x, float y );
extern void cggbm2( GraphicsContext cx, float x0, float y0, float x1, float y1 );
extern void cggbm3( GraphicsContext cx, float x0, float y0, float x1, float y1 );
extern void cggsl( GraphicsContext cx, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3 );
extern void drawCTimeSig( GraphicsContext cx, float x );
extern void drawCTTimeSig( GraphicsContext cx, float x );
extern void drawTrebleClef( GraphicsContext cx, float x );
extern void drawSmallTrebleClef( GraphicsContext cx, float x );
extern void drawBassClef( GraphicsContext cx, float x );
extern void drawSmallBassClef( GraphicsContext cx, float x );
extern void drawCClef( GraphicsContext cx, float x );
extern void drawSmallCClef( GraphicsContext cx, float x );
extern void drawBrace( GraphicsContext cx, float scale, float x, float y );
extern void drawBracket( GraphicsContext cx, float h, float x, float y );
extern void drawStaff( GraphicsContext cx, float x, float y, float l );
extern void drawSeparator( GraphicsContext cx, float x1, float x2 );
