Lines Matching +full:two +full:- +full:dimensional
2 * Copyright (C) 2011-2013 Intel Corporation
37 * struct drm_rect - two dimensional rectangle
51 * DRM_RECT_INIT - initialize a rectangle from x/y/w/h
67 * DRM_RECT_FMT - printf string for &struct drm_rect
71 * DRM_RECT_ARG - printf arguments for &struct drm_rect
74 #define DRM_RECT_ARG(r) drm_rect_width(r), drm_rect_height(r), (r)->x1, (r)->y1
77 * DRM_RECT_FP_FMT - printf string for &struct drm_rect in 16.16 fixed point
81 * DRM_RECT_FP_ARG - printf arguments for &struct drm_rect in 16.16 fixed point
90 (r)->x1 >> 16, (((r)->x1 & 0xffff) * 15625) >> 10, \
91 (r)->y1 >> 16, (((r)->y1 & 0xffff) * 15625) >> 10
94 * drm_rect_init - initialize the rectangle from x/y/w/h
104 r->x1 = x; in drm_rect_init()
105 r->y1 = y; in drm_rect_init()
106 r->x2 = x + width; in drm_rect_init()
107 r->y2 = y + height; in drm_rect_init()
111 * drm_rect_adjust_size - adjust the size of the rectangle
124 r->x1 -= dw >> 1; in drm_rect_adjust_size()
125 r->y1 -= dh >> 1; in drm_rect_adjust_size()
126 r->x2 += (dw + 1) >> 1; in drm_rect_adjust_size()
127 r->y2 += (dh + 1) >> 1; in drm_rect_adjust_size()
131 * drm_rect_translate - translate the rectangle
141 r->x1 += dx; in drm_rect_translate()
142 r->y1 += dy; in drm_rect_translate()
143 r->x2 += dx; in drm_rect_translate()
144 r->y2 += dy; in drm_rect_translate()
148 * drm_rect_translate_to - translate the rectangle to an absolute position
158 drm_rect_translate(r, x - r->x1, y - r->y1); in drm_rect_translate_to()
162 * drm_rect_downscale - downscale a rectangle
171 r->x1 /= horz; in drm_rect_downscale()
172 r->y1 /= vert; in drm_rect_downscale()
173 r->x2 /= horz; in drm_rect_downscale()
174 r->y2 /= vert; in drm_rect_downscale()
178 * drm_rect_width - determine the rectangle width
186 return r->x2 - r->x1; in drm_rect_width()
190 * drm_rect_height - determine the rectangle height
198 return r->y2 - r->y1; in drm_rect_height()
202 * drm_rect_visible - determine if the rectangle is visible
214 * drm_rect_equals - determine if two rectangles are equal
224 return r1->x1 == r2->x1 && r1->x2 == r2->x2 && in drm_rect_equals()
225 r1->y1 == r2->y1 && r1->y2 == r2->y2; in drm_rect_equals()
229 * drm_rect_fp_to_int - Convert a rect in 16.16 fixed point form to int form.
236 drm_rect_init(dst, src->x1 >> 16, src->y1 >> 16, in drm_rect_fp_to_int()
242 * drm_rect_overlap - Check if two rectangles overlap
252 return (a->x2 > b->x1 && b->x2 > a->x1 && in drm_rect_overlap()
253 a->y2 > b->y1 && b->y2 > a->y1); in drm_rect_overlap()