denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Denemo-devel] Breve and Denemo's understanding of durations greater tha


From: Richard Shann
Subject: [Denemo-devel] Breve and Denemo's understanding of durations greater than whole note.
Date: Sun, 17 Oct 2010 09:28:52 +0100

I have pushed the code for creating notes like Breve in Denemo.
The only example I have created is under Notes/Rests->Append/Insert
Duration, once it has been imported via More commands.

Denemo now understands longer durations than whole-note (semibreve) and
Anacrusis and whole measure rests can be simplified.

Note however that as yet the pure rhythm Breve is painted black, not
brown, making it impossible to tell if you will get a breve or an empty
space in the print out.

I hope that the following cairo documentation is explaining how to fix
this:

if you have some surface source which you'd like to paint to some
surface destination at position (x, y) you would use code as follows:

cairo_t *cr = cairo_create (destination);
cairo_set_source_surface (cr, source, x, y);
cairo_paint (cr);

Note that the paint operation will copy the entire surface. If you'd
like to instead copy some (width, height) rectangle from (source_x,
source_y) to some point (dest_x, dest_y) on the destination you would
instead compute a new position for the source surface origin and then
use cairo_fill instead of cairo_paint:

cairo_set_source_surface (cr, source, dest_x - source_x, dest_y - source_y)
cairo_rectangle (cr, dest_x, dest_y, width, height);
cairo_fill (cr);

And note that using a surface as the source pattern will work with any
other cairo drawing operation as well. You can use
cairo_set_source_surface to get patterned effects from cairo_stroke or
cairo_show_text just as easily.

Richard





reply via email to

[Prev in Thread] Current Thread [Next in Thread]