rectsetorigin.c (295B)
1 /* Copyright ©2007-2010 Kris Maglione <maglione.k at Gmail> 2 * See LICENSE file for license details. 3 */ 4 #include "../x11.h" 5 6 Rectangle 7 rectsetorigin(Rectangle r, Point p) { 8 Rectangle ret; 9 10 ret.min.x = p.x; 11 ret.min.y = p.y; 12 ret.max.x = p.x + Dx(r); 13 ret.max.y = p.y + Dy(r); 14 return ret; 15 }