Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 687) +++ trunk/src/obj_poly.c (revision 688) @@ -26,6 +26,8 @@ #include +#include + #include "obj_poly.h" #include "obj_any.h" @@ -41,7 +43,21 @@ static void camv_poly_draw(camv_any_obj_t *obj, rnd_hid_gc_t gc, rnd_xform_mx_t *mx) { - rnd_render->fill_polygon(gc, obj->poly.len, obj->poly.x, obj->poly.y); + if (mx != NULL) { + static vtc0_t x, y; + long n; + if (obj->poly.len > x.alloced) { + vtc0_enlarge(&x, obj->poly.len); + vtc0_enlarge(&y, obj->poly.len); + } + for(n = 0; n < obj->poly.len; n++) { + x.array[n] = rnd_xform_x((*mx), obj->poly.x[n], obj->poly.y[n]); + y.array[n] = rnd_xform_y((*mx), obj->poly.x[n], obj->poly.y[n]); + } + rnd_render->fill_polygon(gc, obj->poly.len, x.array, y.array); + } + else + rnd_render->fill_polygon(gc, obj->poly.len, obj->poly.x, obj->poly.y); } static void camv_poly_bbox(camv_any_obj_t *obj)