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

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.

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.

Steve Schafer
Fenestra Technologies Corp.
http://www.fenestra.com/

Received on Monday, 24 March 2003 19:32:44 UTC