+ case WHEEL_DOWN:
+ s = 2 - s;
+ th = -th; // fall thru
+ case WHEEL_UP: { // shift_down scale, !shift_down rotate
+ s = 1 + (s-1)*accel;
+ th *= accel;
+ float st = sin(th), ct = cos(th);
+ int sz = points.size();
+ int shift_down = (state & ShiftMask) ? 1 : 0;
+ for( int i=0; i<sz; ++i ) {
+ SketcherPoint *pt = points[i];
+ float px = pt->x - track_x, py = pt->y - track_y;
+ float nx = shift_down ? px*s : px*ct + py*st;
+ float ny = shift_down ? py*s : py*ct - px*st;
+ point_list->set_point(i, PT_X, pt->x = nx + track_x);
+ point_list->set_point(i, PT_Y, pt->y = ny + track_y);
+ }
+ point_list->update(-1);
+ button_no = 0;
+ break; }
+