[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

render_svg.c patch



Hello,
I've recently started using xml-docbook/svg for documenting my 4th year
project... I managed to find some bugs in render_svg.c code. The bug
occurs during rendering of arcs. It seems that the case of angles lying
across 0degree boundary was not handled and the large-arc-flag was not
being calculated properly... I've never sent a patch before...  here it
is. For some reason my svgs are still not getting rendered properly...
but at least the large-arc-flag is fixed....
Mike 
-- 
/*******************************************************************\
|      Mike Sowka                   o      _     _         _        |
| An Aspiring Engi"Nerd"    _o     /\_   _ \\o  (_)\__/o  (_)       |
|  Carleton University    _< \_   _>(_) (_)/<_    \_| \   _|/' \/   |
| msowka@doe.carleton.ca (_)>(_) (_)        (_)   (_)    (_)'  _\o_ |
| (home mike@sowka.com)                                             |
\*******************************************************************/
667,673c667
<   int l_arc;
< 
<   if (angle2 > angle1) {
<     l_arc = (angle2 - angle1) > 180;
<   } else {
<     l_arc = (360 - angle2 + angle1) > 180;
<   }
---
>   int l_arc = (angle2 - angle1) > 180;
703,709c697
<   int l_arc;
< 
<   if (angle2 > angle1) {
<     l_arc = (angle2 - angle1) > 180;
<   } else {
<     l_arc = (360 - angle2 + angle1) > 180;
<   }
---
>   int l_arc = (angle2 - angle1) > 180;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] Mail converted by Mofo Magic and the Flying D

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

GuideSMACK