git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix SVG rendering of glyphs.svg
[ipdf/code.git]
/
src
/
document.cpp
diff --git
a/src/document.cpp
b/src/document.cpp
index
d4d8eac
..
a4b20d0
100644
(file)
--- a/
src/document.cpp
+++ b/
src/document.cpp
@@
-437,6
+437,11
@@
void Document::AddPathFromString(const string & d, const Rect & bounds)
{
x[3] = x[2];
y[3] = y[2];
+ Real old_x1(x[1]), old_y1(y[1]);
+ x[1] = x[0] + Real(2) * (old_x1 - x[0])/ Real(3);
+ y[1] = y[0] + Real(2) * (old_y1 - y[0])/ Real(3);
+ x[2] = x[3] + Real(2) * (old_x1 - x[3])/ Real(3);
+ y[2] = y[3] + Real(2) * (old_y1 - y[3])/ Real(3);
}
unsigned index = AddBezierData(Bezier(x[0],y[0],x[1],y[1],x[2],y[2],x[3],y[3]));
@@
-458,8
+463,8
@@
void Document::AddPathFromString(const string & d, const Rect & bounds)
assert(GetToken(d,token,i) == ",");
Real dy = strtod(GetToken(d,token,i).c_str(),NULL) / bounds.h;
- x[1] = (relative) ? x
0
+ dx : dx;
- y[1] = (relative) ? y
0
+ dy : dy;
+ x[1] = (relative) ? x
[0]
+ dx : dx;
+ y[1] = (relative) ? y
[0]
+ dy : dy;
x[2] = x[1];
y[2] = y[1];
UCC
git Repository :: git.ucc.asn.au