extending inkview, background color as parameter
Hello,
I use inkscape to create android icons / menu entries, action bar items etc. in different sizes. It is best to have input as SVG with transparent background and white foreground.
To browse these SVGs i'd like to use inkview (inkscape has several disadvantages for this).
But as inkview uses a white background i see white on white.
I downloaded inkscape-0.48.5 and compiled it and began to hack the sources. I try to load the SVG, then change its background color and opacity (only in memory / RAM) and then display that changed SVG.
As a first test i added in inkview.cpp in main():
printf("HERE\n"); Inkscape::XML::Node *nv = sp_repr_lookup_name (ss.doc->rroot, "sodipodi:namedview"); printf("nv is %p\n", nv); nv->setAttribute("pageopacity", "1.0"); nv->setAttribute("pagecolor", "#808000");
I do this quite at the end, directly before: sp_document_ensure_up_to_date (ss.doc); ss.view = sp_svg_view_widget_new (ss.doc);
It did not lead to any change, i still see white-on-white.
Basically i have some questions and it would be great if you could give me some hints on how to patch inkview.
What i try is to change the loaded SVG document in memory and display that changed document. Is that a good approach or could it be done better / cleaner?
It would be cool to view a grey grid in the background for transparent areas. Is there a way to achieve this?
Best regards Torsten
participants (1)
-
Torsten Mohr