You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Nebojša Miletić <ne...@accordia.co.yu> on 2006/11/15 17:30:01 UTC
Element templates
Hi,
I'm displaying a lots of same elements in my application (e.g. I have 200
same images or 200 text elements with same value). Each element consumes
same amount of memory.
Is there a way to create only one template element but render and show many
of these elements using that template element as a pattern (or something
similar) in order to reduce memory consumption?
I tried using the 'use' element, but memory occupation increased twice.
Thanks,
Nebojsa
--
View this message in context: http://www.nabble.com/Element-templates-tf2637269.html#a7361007
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: Element templates
Posted by th...@kodak.com.
Hi Nebojsa,
Nebojša Miletić <ne...@accordia.co.yu> wrote on 11/15/2006 11:30:01 AM:
> I'm displaying a lots of same elements in my application (e.g. I have
200
> same images or 200 text elements with same value). Each element consumes
> same amount of memory.
>
> Is there a way to create only one template element but render and show
many
> of these elements using that template element as a pattern (or something
> similar) in order to reduce memory consumption?
Hmm, well in the 'hack' arena you might look at using markers.
Define the repeated content as a marker and then set that marker on
a path that consists of nothing but moveto commands
(d="M 10,10 M20,30 ...").
Using markers can be a bit tricky but there are some examples in
the samples/test/spec/painting directory.
You could also potentially write a Batik extension to do this as well.
> I tried using the 'use' element, but memory occupation increased twice.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org