src/2d.c

changeset 251
2e2d4c3bf1cd
parent 250
d766b4f033d7
child 256
60014484121c
equal deleted inserted replaced
250:d766b4f033d7 251:2e2d4c3bf1cd
162 ); 162 );
163 return node; 163 return node;
164 } 164 }
165 165
166 void asc_rectangle_set_bounds(AscRectangle *rect, asc_rect bounds) { 166 void asc_rectangle_set_bounds(AscRectangle *rect, asc_rect bounds) {
167 // TODO: check how this harmonizes with a different origin 167 float x = (float) bounds.pos.x + rect->node.origin.x;
168 float x = (float) bounds.pos.x; 168 float y = (float) bounds.pos.y + rect->node.origin.y;
169 float y = (float) bounds.pos.y;
170 float width = (float) bounds.size.width; 169 float width = (float) bounds.size.width;
171 float height = (float) bounds.size.height; 170 float height = (float) bounds.size.height;
172 bool update_transform = false; 171 bool update_transform = false;
173 bool update_mesh = false; 172 bool update_mesh = false;
174 update_transform |= asc_util_check_and_set(rect->node.position.x, x); 173 update_transform |= asc_util_check_and_set(rect->node.position.x, x);

mercurial