xref: /haiku/src/servers/app/drawing/drawing_support.cpp (revision d3d8b26997fac34a84981e6d2b649521de2cc45a)
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