Re: Manipulate elements by id or class name - Idea for a feature request

"Jayesh Salvi" <[email protected]>
Newsgroups gmane.comp.gnome.lib.librsvg.devel
Message-ID <[email protected]>
Hi Hagen,

Maybe the project I am doing might interest you.

My goal is to use SVG to create GUIs for handhelds (More details
here<http://jyro.blogspot.com/2008/09/inkface-svg-based-gui-design.html>
).

I don't have complete solution for what you are saying, but I created a
modified version of librsvg (dubbed libaltsvg) (source available
here<http://code.google.com/p/altcanvas/source/browse/trunk/libaltsvg/>).
So far I have added handful of new calls that can be used to separately get
individual components of the SVG image. These individual components are
exported as cairo surface which can be selectively drawn as per the
programming logic.

I am further interested in changing the attributes of these individual
components: for e.g. text of a text element; or color of the element; etc.

You can take a look and see if it serves your purpose.

Hope that helps!

Jayesh



On Mon, Oct 6, 2008 at 3:19 AM, Hagen Schink <[email protected]>wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello there!
>
> I'd like to discuss the idea of a feature request I have in mind. I've
> bothered a developer (at least I guess he's one) on IRC already but he said
> that there is no real chance for this request to become accepted. I want to
> use this mail to point to some advantages I see though.
>
> The main idea is that librsvg provides an API which allows the developer to
> manipulate attributes of the SVG file on the fly. In the end this means the
> manipulation of a RsvgHandle. Here a simplified example:
>
> static void
> rsvg_set_attribute (RsvgHandle *handle, gchar *id, gchar *attribute, gchar
> *value);
>
> I think it's obvious that this is much more convenient then a lot of file
> and libxml magic. At least I hope to preserve the speed benefit librsvg
> provides.
>
> This would enable the developer to manipulate SVGs in a way that preserves
> different measures (and this is very important, at least for the designer
> and his artwork). With pure Cairo this is not possible (please correct me if
> I'm wrong).
>
> I don't know how much effort is needed to provide an API in the way I
> proposed. Neither I know if there are other concerns which speak against
> such an API. But I'd like to discuss it to understand a possible refusal.
>
> Kind regards,
>   Hagen Schink
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkjp5h8ACgkQ1UAqryBcuEX18gCfWInzN6A2WbXCQp6LhAZuaJav
> H58AoIAdJ2yD7oYzC6T0p/ouJIy2LnRZ
> =EOa8
> -----END PGP SIGNATURE-----
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Librsvg-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/librsvg-devel
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

_______________________________________________
Librsvg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/librsvg-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.