1 #include "drawing_support.h" 2 3 #include <Rect.h> 4 5 void 6 align_rect_to_pixels(BRect* rect) 7 { 8 // round the rect with the least ammount of distortion 9 rect->OffsetTo(roundf(rect->left), roundf(rect->top)); 10 rect->right = roundf(rect->right); 11 rect->bottom = roundf(rect->bottom); 12 } 13 14