comparison text.d @ 104:5c8c1c2e12c0

Change from real to double. double is not dependant on the platform, and it uses less space.
author Jordan Miner <jminer7@gmail.com>
date Fri, 06 Jul 2012 18:39:45 -0500
parents 301e077da540
children
comparison
equal deleted inserted replaced
103:73060bc3f004 104:5c8c1c2e12c0
92 char[] text; 92 char[] text;
93 Tab[] tabs; 93 Tab[] tabs;
94 uint defaultTabLocations = 0; // no default tabs 94 uint defaultTabLocations = 0; // no default tabs
95 // newLineSpacing = old * mul + delta 95 // newLineSpacing = old * mul + delta
96 // spacing after line, as part of it 96 // spacing after line, as part of it
97 real lineSpacingMul = 1.0; // percent 97 double lineSpacingMul = 1.0; // percent
98 real lineSpacingDelta = 0; // pixels 98 double lineSpacingDelta = 0; // pixels
99 Alignment alignment; 99 Alignment alignment;
100 100
101 uint width; 101 uint width;
102 delegate wrap 102 delegate wrap
103 103
114 Point location; 114 Point location;
115 Size size; 115 Size size;
116 } 116 }
117 Format { 117 Format {
118 string family; 118 string family;
119 real size; 119 double size;
120 bool bold; 120 bool bold;
121 bool italic; 121 bool italic;
122 // spaces are not underlined, overlined, or strikethrough unless 122 // spaces are not underlined, overlined, or strikethrough unless
123 // words on both sides are 123 // words on both sides are
124 LineStyle underlined; 124 LineStyle underlined;
125 LineStyle strikethrough; 125 LineStyle strikethrough;
126 LineStyle overlined; 126 LineStyle overlined;
127 bool superscript; // 2/3 of the height 127 bool superscript; // 2/3 of the height
128 bool subscript; // 2/3 of the height 128 bool subscript; // 2/3 of the height
129 real letterSpacingMul = 1.0; // after letter, as part of it 129 double letterSpacingMul = 1.0; // after letter, as part of it
130 real letterSpacingAdd = 0; 130 double letterSpacingAdd = 0;
131 // ( ^ useful for Hexplore's column spacing) 131 // ( ^ useful for Hexplore's column spacing)
132 Color foreColor; 132 Color foreColor;
133 Color backColor; 133 Color backColor;
134 134
135 135
149 void apply(ref Format format) { 149 void apply(ref Format format) {
150 150
151 } 151 }
152 union Data { 152 union Data {
153 string family; 153 string family;
154 real size; 154 double size;
155 bool on; // bold and italic 155 bool on; // bold and italic
156 LineStyle lineStyle; 156 LineStyle lineStyle;
157 real letterSpacing; 157 double letterSpacing;
158 Color color; 158 Color color;
159 } 159 }
160 } 160 }
161 enum FormatType : ubyte { 161 enum FormatType : ubyte {
162 Family, Size, Bold, Italic, Underline, Strikethrough, Overline, 162 Family, Size, Bold, Italic, Underline, Strikethrough, Overline,