<community>of XML and SVG Developers</community>
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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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 |
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.