17 style = border_style_none;
54 width = (int) val.width.val();
67 width = (int) val.width.val();
101 top_left_x = val.top_left_x;
102 top_left_y = val.top_left_y;
103 top_right_x = val.top_right_x;
104 top_right_y = val.top_right_y;
105 bottom_right_x = val.bottom_right_x;
106 bottom_right_y = val.bottom_right_y;
107 bottom_left_x = val.bottom_left_x;
108 bottom_left_y = val.bottom_left_y;
112 top_left_x = val.top_left_x;
113 top_left_y = val.top_left_y;
114 top_right_x = val.top_right_x;
115 top_right_y = val.top_right_y;
116 bottom_right_x = val.bottom_right_x;
117 bottom_right_y = val.bottom_right_y;
118 bottom_left_x = val.bottom_left_x;
119 bottom_left_y = val.bottom_left_y;
122 void operator += (
const margins& mg)
124 top_left_x += mg.left;
125 top_left_y += mg.top;
126 top_right_x += mg.right;
127 top_right_y += mg.top;
128 bottom_right_x += mg.right;
129 bottom_right_y += mg.bottom;
130 bottom_left_x += mg.left;
131 bottom_left_y += mg.bottom;
134 void operator -= (
const margins& mg)
136 top_left_x -= mg.left;
137 top_left_y -= mg.top;
138 top_right_x -= mg.right;
139 top_right_y -= mg.top;
140 bottom_right_x -= mg.right;
141 bottom_right_y -= mg.bottom;
142 bottom_left_x -= mg.left;
143 bottom_left_y -= mg.bottom;
148 if (top_left_x < 0) top_left_x = 0;
149 if (top_left_y < 0) top_left_y = 0;
150 if (top_right_x < 0) top_right_x = 0;
151 if (top_right_y < 0) top_right_y = 0;
152 if (bottom_right_x < 0) bottom_right_x = 0;
153 if (bottom_right_y < 0) bottom_right_y = 0;
154 if (bottom_left_x < 0) bottom_left_x = 0;
155 if (bottom_left_y < 0) bottom_left_y = 0;
180 top_left_x = val.top_left_x;
181 top_left_y = val.top_left_y;
182 top_right_x = val.top_right_x;
183 top_right_y = val.top_right_y;
184 bottom_left_x = val.bottom_left_x;
185 bottom_left_y = val.bottom_left_y;
186 bottom_right_x = val.bottom_right_x;
187 bottom_right_y = val.bottom_right_y;
192 top_left_x = val.top_left_x;
193 top_left_y = val.top_left_y;
194 top_right_x = val.top_right_x;
195 top_right_y = val.top_right_y;
196 bottom_left_x = val.bottom_left_x;
197 bottom_left_y = val.bottom_left_y;
198 bottom_right_x = val.bottom_right_x;
199 bottom_right_y = val.bottom_right_y;
205 ret.bottom_left_x = bottom_left_x.calc_percent(width);
206 ret.bottom_left_y = bottom_left_y.calc_percent(height);
207 ret.top_left_x = top_left_x.calc_percent(width);
208 ret.top_left_y = top_left_y.calc_percent(height);
209 ret.top_right_x = top_right_x.calc_percent(width);
210 ret.top_right_y = top_right_y.calc_percent(height);
211 ret.bottom_right_x = bottom_right_x.calc_percent(width);
212 ret.bottom_right_y = bottom_right_y.calc_percent(height);