bda0d169782f8dfb06fe072754cc66f679a3b03a
1 /*
2 * Inkscape::Text::Layout - text layout engine misc
3 *
4 * Authors:
5 * Richard Hughes <cyreve@users.sf.net>
6 *
7 * Copyright (C) 2005 Richard Hughes
8 *
9 * Released under GNU GPL, read the file 'COPYING' for more information
10 */
11 #include "Layout-TNG.h"
13 namespace Inkscape {
14 namespace Text {
16 const gunichar Layout::UNICODE_SOFT_HYPHEN = 0x00AD;
17 const double Layout::LINE_HEIGHT_NORMAL = 1.25;
19 Layout::Layout()
20 {
21 _path_fitted = NULL;
22 }
24 Layout::~Layout()
25 {
26 clear();
27 }
29 void Layout::clear()
30 {
31 _clearInputObjects();
32 _clearOutputObjects();
33 }
35 bool Layout::_directions_are_orthogonal(Direction d1, Direction d2)
36 {
37 if (d1 == BOTTOM_TO_TOP) d1 = TOP_TO_BOTTOM;
38 if (d2 == BOTTOM_TO_TOP) d2 = TOP_TO_BOTTOM;
39 if (d1 == RIGHT_TO_LEFT) d1 = LEFT_TO_RIGHT;
40 if (d2 == RIGHT_TO_LEFT) d2 = LEFT_TO_RIGHT;
41 return d1 != d2;
42 }
44 }//namespace Text
45 }//namespace Inkscape