David Dailey wrote: > > I'm certain this topic has been discussed before (perhaps even by me), so > please forgive any duplication. In the example at > http://granite.sru.edu/~ddailey/svg/B/bbox2.3.svg the bounding box around > the curve (as drawn by script) does not factor in the stroke-width. Is there > a method that does this? Given that the bounds of the stroke will be > parallel to the curve itself and I assume (though I don't see instructions > in the spec [1] ) that offsets are determined by lines perpendicular to > tangents to the curve at its endpoints, calculating the actual bounding box > might not be an easy scripting exercise. >
Hi David, I haven't tested this method, but it may provide what you need; It seems the stroke width is 1/2 inside and 1/2 outside the element's rendered image. Try creating two clones of the element w/o stroke. CloneOut would have its values added by 1/2 stroke width. CloneIn would have 1/2 stroke width subtracted from its values. Then getBBox for both clones. Lookis like this should work for paths with minor changes for circles, rects, etc. which would only need 1 CloneOut. Methinks stroke placement should be settable as in,middle,out. Cheers, Francis ------------------------------------ ----- To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ----Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: svg-developers-dig...@yahoogroups.com svg-developers-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: svg-developers-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/