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