W3C home > Mailing lists > Public > www-svg@w3.org > March 2003

Re: element visibility only within the group, not whole document?

From: Thomas E Deweese <thomas.deweese@kodak.com>
Date: Tue, 25 Mar 2003 07:28:28 -0500
Message-ID: <16000.19308.104387.528583@frog.rl.kodak.com>
To: Mitch Germansky <mbg@cs.rutgers.edu>
Cc: www-svg@w3.org


Hi Mitch,

   One question and one comment.

   First, the question: if you are using Java/Batik how are you using
'set' animation elements?  Batik currently doesn't support SMIL
Animation.

   Second, the comment: Rather than add 'set' animation elements to
the DOM which does add processing overhead per rendering I would
suggest tweaking the visibility property on the element's directly.
You could also simply remove the elements from the DOM for the Undo
action (and remember the location they belong in - previous
sibling/parent for instance) and reinsert the element for Redo.  If
you want to persist the history put them in a defs section with some
additional metadata in a private namespace.

   As for transforming lines to bezier curves, I suggest looking up
point interpolation (this was as I recall the original reason for
developing bezier curves).

>>>>> "MG" == Mitch Germansky <mbg@cs.rutgers.edu> writes:

MG> Steve Schafer wrote:

>> On Mon, 24 Mar 2003 11:20:14 -0500, Mitch Germansky
>> <mbg@cs.rutgers.edu> wrote:
>> 
>> 
>> 
>>> is it possible to have a white <rect> effect only the objects
>>> (e.g.  <line>s) of the <g> the <rect> and <line> are contained in?
>>> 
>>> it appears that the <rect> whites out the entire document.  i am
>>> looking for a way to "erase" <line>s only within one of many <g>s
>>> in a document.
>>> 
>>> i've written my application to place a <set> hidden visibility
>>> animation for every <line> within the <g> and this works, but it
>>> does not perform as well as a single animated <rect> would do.
>>> 
>>> 
>>  I think you're going to find yourself in a deeper and deeper mess
>> if you try to implement "erase" or "undo" functions in this
>> fashion. You've only just scratched the surface in terms of the
>> painting complexity, and I can tell you from personal experience
>> that it will only get worse. You need to implement erase/undo at
>> the "logical" level (i.e., within the SVG structure of your
>> document), rather than at the "paint" level (i.e., by dealing with
>> the resulting visual appearance). In other words, if you want to
>> erase a set of marks, you have to delete (or otherwise disable) the
>> instructions that create those marks from the SVG; you can't paint
>> over them.

MG> so, you are suggesting that the method i am currently using of
MG> changing visibility in <set> animations for each <line> is the way
MG> to go?

>> It's true that performance can be an issue, but you need to address
>> that separately. For example, many vector-based drawing programs
>> that allow free-form scribbling will convert the scribbles to a
>> relatively small number of Bezier curves to improve performance.
>> 
MG> being new in this arena, can you point me to some resources for
MG> doing transformations for a set of <line>s to a small number of
MG> bezier curves?  my platform is java batik.

MG> thanks very much for your insight!
Received on Tuesday, 25 March 2003 07:29:06 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:24 GMT