mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-26 06:12:34 -06:00
.examples
git-svn-id: svn://ultimatepp.org/upp/trunk@14205 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
38df12a9b9
commit
d400a792fc
6 changed files with 41 additions and 79 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#include "TextToSvgPath.h"
|
||||
|
||||
struct TextToSvg : FontGlyphConsumer {
|
||||
String t;
|
||||
String t; // here we accumulate the SVG path text
|
||||
|
||||
void Put(Pointf p);
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ String TextToSvgPath(double x, double y, const char *text, Font fnt, bool single
|
|||
TextToSvg t;
|
||||
for(const wchar *s = ~ws; *s; s++) {
|
||||
fnt.Render(t, x, y, *s);
|
||||
x += fnt[*s];
|
||||
x += fnt[*s]; // move the reference point
|
||||
if(!singleline)
|
||||
t.t << "\n";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue