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