List Info

Thread: Group transform attribute




Group transform attribute
country flaguser name
Ukraine
2008-02-15 11:57:24
Hi!

Attached patch removes wrapping of groups with transform
attribute,
and applies that transform to inner elements instead. It's
very very
useful if you need to access elements from actionscript.

Will this sort of patch (may be not exacly this) be accepted
for trunk?

Probably if I care of structure of movie more than
positions, somebody
will care more about positions of movieclips (I feel that it
can be not the
same as in svg). So may be this behavior can be turned on by
some
attribute, e.g.:
<clip id="svgpiece"
import="piece.svg" keep-structure="true"
/>

Any thoughts?
--
Paul

_______________________________________________
swfmill mailing list
swfmillosflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org

  
Re: Group transform attribute
country flaguser name
Germany
2008-02-16 08:37:29
This problem occurs when you define g or path elements that
are not at the origin. According to the W3C SVG
specification, these element's transformations need to be
included in all possible references (i.e. use elements).
However, in SWF, you cannot specify transformations in the
definition of an element, only in the references. That's why
we need the wrappers.

I was accessing the MovieClips with ActionScript too, that's
why I wanted the structure to stay intact. However, I also
care much about the position. As a workaround, I built in
this conditional branch:

		
			
			
				
					
					
					
				
			
		

If the defining element is at (0,0), then the wrapper is
omitted, and both structure and position stay intact. Sadly,
Inkscape doesn't support an asset library where you can
store and browse your definitions, like in the Flash IDE.
Instead, to see them all, you have to spread them out, so
it's hard to keep them all at the origin.

An additional improvement would be to check if there
actually are any references. Often, this is not the case in
SVG documents. The wrapper could then be safely omitted as
well.


The question is, who (if anyone) is actually using the SVG
import? If graphics artists use it to import complete SVG
graphics to be used as a whole, then position is everything,
and structure doesn't matter much. And my impression was
that Inkscape is geared more towards creating static
images...


Your idea of an import flag is probably useful, for the
wrapping as well as for some other aspects.

The best solution for our wrapper problem was suggested by
Daniel: instead of wrapping the referenced elements, the 2
transforms could be combined into one, keeping both
structure and position intact, thus eliminating the need for
wrappers. The parsing and multiplication of matrices might
be too much for XSLT, that's why we would need a C
function.

I am currently concentrating on Batik programming, but if
you would like to try and implement such a function, I'll be
glad to help.

Cheers,
Gerrit


> Date: Fri, 15 Feb 2008 19:57:24 +0200
> From: pcgafol.net
> To: swfmillosflash.org
> Subject: [swfmill] Group transform attribute
>
> Hi!
>
> Attached patch removes wrapping of groups with
transform attribute,
> and applies that transform to inner elements instead.
It's very very
> useful if you need to access elements from
actionscript.
>
> Will this sort of patch (may be not exacly this) be
accepted for trunk?
>
> Probably if I care of structure of movie more than
positions, somebody
> will care more about positions of movieclips (I feel
that it can be not the
> same as in svg). So may be this behavior can be turned
on by some
> attribute, e.g.:
> 
>
> Any thoughts?
> --
> Paul




____________________________________________________________
_____
Express yourself instantly with MSN Messenger! Download
today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471
ave/direct/01/
_______________________________________________
swfmill mailing list
swfmillosflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org

Re: Group transform attribute
country flaguser name
Ukraine
2008-02-29 12:29:14
Gerrit . wrote:
> [...]
>
> I am currently concentrating on Batik programming, but
if you would like to try and implement such a function, I'll
be glad to help.
Yes, I'd like. Patch attached. It combines two transforms
into one by 
multiplicating matrices with C function, just as you
suggested.
swft:transform2, gives two transform specification and
produces tag just 
like swft:tranform. Patch includes test case, which looks
same with both 
versions (trunk and patched), but "wrap-element"
test (in scriptout text 
field) shows difference.

The problems I've found:
1. svg:use which links to svg:use is not even present in the
clip (both 
in trunk and my version). I don't know how to handle it
recursively
2. I want inkscape's transformation center to be origin of
movie clip 
(possibly optionally), but the problem is that it's bound to
center of 
object, but I have no great ideas how to find that point
(traversing of 
whole tree of contained objects probably not good option)

Any comments and pointers are welcome.

--
Paul.

_______________________________________________
swfmill mailing list
swfmillosflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org

  
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )