XML Elves

XML Elves

<community>of XML and SVG Developers</community>


Gradients along moving lines

This is a discussion on Gradients along moving lines within the SVG Questions forums, part of the SVG Forums category; Hello, I am trying to make an interesting effect happen with interactive SVG. I have implemented some code to allow ...


Go Back   XML Elves > SVG Forums > SVG Questions

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices


Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-26-2005, 11:18 AM
tstokes
Guest
 
Posts: n/a
Default Gradients along moving lines

Hello,

I am trying to make an interesting effect happen with interactive SVG. I have implemented some code to allow boxes to be dragged around on the SVG canvas. The boxes are connected together by lines, and the ends of the lines will follow the boxes around so that the connections are maintained.

The boxes are moved by applying a transform to the element. I couldn't figure out how a transform might work on a line, so I'm actually resetting the line endpoints as the box moves.

The problem arises when I try to do some fancy visualization. I have added an arrow marker to one end of the line and I've widened the stroke and added a gradient to the line to indicate the direction more clearly.
Here is a URL to my example:
http://gaia.bme.gatech.edu:8081/GAViewer/ga2.svg
Click one of the edges to make an arrow appear. Click again to reverse the direction of the arrow.

If the boxes stay in the same vertical orientation to each other, the gradient looks great. but as soon as one box is moved across the vertical plane of another box, the gradient direction disagrees with the arrow direction.

I tried using a radial gradient, but the result is the same. The gradient seems to be based on the bounding box around the line, irrespective of the orientation of the line within the bounding box.

Can anyone suggest a way to get around this problem?

Thanks,
Todd
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
gradients, lines, moving


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -6. The time now is 02:38 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

Ink Jet Cartridges...
View the numerous different makes of inkjet cartridges available online.

ink
Buy ink for printers directly from the factory! Fantastic value as well as superb special offers. Top brands!

Hard Disk Drive Data Recovery Cheshire
Do you need data recovery done? We will collect your hard disk drive in Cheshire and our success rate is unequalled.

ink cartridges Free UK Delivery on ink cartridges such as Canon, Dell, Epson, hp & Lexmark.

1 2 3 4 5 6 7 8 9 10