This isn't really animation as in the demos I saw. Rather, I want objects to appear when the mouse in inside a region and/or move them up to the top. Take a look at the images in Category:Snaefell mountain course circuit maps. My test image is shown below.. If you look at it, there is a group with the id WestMapBoundary. It is near the bottom of the image Z-order. It contains two objects. One is currently invisible. It has the id WestMapLimits. When the mouse is over WestMapLimits, I want it to appear such that it inverts whatever is under need (effect needed of some sort). I also want the group (WestMapBoundary) to move up to the top of the image Z-order.
I am working on deciding how to do the effect, but need help with the script. Has anyone written scripts like what I had in mind? What is involved in changing elements like that?
How do I invert the region under a rect?
-
- Posts: 13
- Joined: Sun Mar 30, 2008 1:11 pm
- Location: Morton, IL
How do I invert the region under a rect?
Last edited by Will Pittenger on Mon Nov 10, 2008 5:31 pm, edited 2 times in total.
Will Pittenger
-
- Posts: 13
- Joined: Sun Mar 30, 2008 1:11 pm
- Location: Morton, IL
Re: How to use scripts to make objects appear
Well, I never did get the filter above figured out. With Freenode down, I can't ask in the Inkscape channel. (That was Plan A before I decided to start this thread.) I managed to get another filter effect that I wanted working. But not a way to invert the space under a rect. So it looks like I need help with that effect.
As for scripting, I installed Firebug into Firefox so I could see the DOM structure of a SVG file. The Style member of my rect doesn't appear to break the rect's style attributes out into seperate fields. Rather, I see fields that match a normal HTML/XHMTL file. Is this normal or is Firebug's SVG support limited?
As for scripting, I installed Firebug into Firefox so I could see the DOM structure of a SVG file. The Style member of my rect doesn't appear to break the rect's style attributes out into seperate fields. Rather, I see fields that match a normal HTML/XHMTL file. Is this normal or is Firebug's SVG support limited?
Will Pittenger
Re: How to use scripts to make objects appear
Will Pittenger wrote:But not a way to invert the space under a rect. So it looks like I need help with that effect.
A color-inverting filter effect is pretty easy. You can see one I made here:
http://openclipart.org/media/files/kelan/8769
Download the SVG and you can see how it's done. What that filter does when applied to an object is make that object appear as the negative of whatever is underneath it, which sounds like what you want in your first post.
-
- Posts: 13
- Joined: Sun Mar 30, 2008 1:11 pm
- Location: Morton, IL
Re: How do I use scripts to make objects appear?
Something about your image prevents it from working in Firefox 3.0.3.
Will Pittenger
-
- Posts: 13
- Joined: Sun Mar 30, 2008 1:11 pm
- Location: Morton, IL
Re: How to use scripts to make objects appear
kelan wrote:Will Pittenger wrote:But not a way to invert the space under a rect. So it looks like I need help with that effect.
A color-inverting filter effect is pretty easy. You can see one I made here:
http://openclipart.org/media/files/kelan/8769
Download the SVG and you can see how it's done. What that filter does when applied to an object is make that object appear as the negative of whatever is underneath it, which sounds like what you want in your first post.
I am unable to reproduce the effect in my document even with the same parameters.
Will Pittenger
-
- Posts: 13
- Joined: Sun Mar 30, 2008 1:11 pm
- Location: Morton, IL
Re: How to use scripts to make objects appear
Will Pittenger wrote:kelan wrote:Will Pittenger wrote:But not a way to invert the space under a rect. So it looks like I need help with that effect.
A color-inverting filter effect is pretty easy. You can see one I made here:
http://openclipart.org/media/files/kelan/8769
Download the SVG and you can see how it's done. What that filter does when applied to an object is make that object appear as the negative of whatever is underneath it, which sounds like what you want in your first post.
I am unable to reproduce the effect in my document even with the same parameters.
I think I now know why I failed to recreate your effect in my document. The "background image" input ignores the contents of things outside the group the object is in. That makes things awkward at best for me as I need to move WestMapBoundary up from the bottom to the top of the image Z-order.
Will Pittenger
-
- Posts: 13
- Joined: Sun Mar 30, 2008 1:11 pm
- Location: Morton, IL
Re: How do I use scripts to make objects appear?
This is what happens when I modified your image as described above.
As SVG:
As PNG:
As SVG:
As PNG:
Will Pittenger
-
- Posts: 13
- Joined: Sun Mar 30, 2008 1:11 pm
- Location: Morton, IL
Re: How do I use scripts to make objects appear?
For the moment, I have a temporary location with the scripts installed. Now all I need is the filter to work.
Will Pittenger