Thu 07 Apr 2011 09:04:31 AM UTC, comment #4:
Apparently, just changing the "width" and "height" fields and then dividing each number that appears in the <\path ...> field by 10 scales...
I don't think this is true for all the types of path fields unfortunately.
I think if we can reduce them it will work - the cpu usage should only be proportional to the number on visible in the displayed portion of the score, not the total number in the score. This is the same as for .png graphics.
Here are a couple of .png 's ....
I have put these in (renamed notehead_M?neomensural.png) and they do the trick. We don't have the rests.
This workaround actually yields better zooming (which is what .svgs are for in part) because of the cairo bug.
|
Sat 26 Mar 2011 08:27:11 AM UTC, comment #1:
This is not specific to windows. It is probably due to the .svg images being 1000x1000 in "size"
We need cairo expertise to solve this. The code is drawing by calling
cairo_mask(cr, pattern);
on a pattern derived from a 1000x1000 SVG image stored in a file name.svg. The code to generate the pattern is this:
gchar *filename = g_strconcat(name, ".svg", NULL);
gfloat thescale=0.04, offx=500.0, offy=500.0;
g_print("Scale %f and offset (%f, %f) are chosen to match the set of .svgs extracted from the emmenthaler font\n", thescale, offx, offy);
RsvgHandle *handle = rsvg_handle_new_from_file(filename, &error);
g_free(filename);
if(handle==NULL) {
if(error)
g_warning("Could not open %s error %s\n", basename, error->message);
else
g_warning("Opening %s, Bug in librsvg:rsvg handle null but no error message", basename);
return FALSE;
}
RsvgDimensionData thesize;
rsvg_handle_get_dimensions(handle, &thesize);
g_print("size %d x %d", thesize.width, thesize.height);
cairo_surface_t surface = (cairo_surface_t )cairo_svg_surface_create_for_stream (NULL, NULL, (gdouble)thesize.width, (gdouble)thesize.height);
cairo_t *cr = cairo_create(surface);
cairo_translate(cr, offx, offy);
cairo_scale(cr, thescale, -thescale);
g_print("scaled %f %f %f\n", thescale, offx, offy);
rsvg_handle_render_cairo(handle, cr);
rsvg_handle_close(handle, NULL);
g_object_unref(handle);
cairo_pattern_t *pattern = cairo_pattern_create_for_surface (surface);
cairo_pattern_reference(pattern);
cairo_destroy(cr);
|
Sun 20 Feb 2011 11:19:09 PM UTC, original submission:
This is the carry-over from the other bug report. (The other stuff was fixed--thanks a lot.)
Change the time signature to 16/4, and fill up about 16 bars with breve and longa.
The cpu usage jumps up to about 30% when denemo is idling. (normal denemo usage is at 1%) The ram usage jumps around erratically (but NOT showing a long-term upward tendency). On my machine, from about 11,500K to 12,500K, every second or so it appears as a new apparently random value in that range.
-Dan W.
|