Lines Matching full:r

56  * @r: rectangle struct
58 #define DRM_RECT_ARG(r) drm_rect_width(r), drm_rect_height(r), (r)->x1, (r)->y1 argument
66 * @r: rectangle struct
71 #define DRM_RECT_FP_ARG(r) \ argument
72 drm_rect_width(r) >> 16, ((drm_rect_width(r) & 0xffff) * 15625) >> 10, \
73 drm_rect_height(r) >> 16, ((drm_rect_height(r) & 0xffff) * 15625) >> 10, \
74 (r)->x1 >> 16, (((r)->x1 & 0xffff) * 15625) >> 10, \
75 (r)->y1 >> 16, (((r)->y1 & 0xffff) * 15625) >> 10
79 * @r: rectangle
85 static inline void drm_rect_init(struct drm_rect *r, int x, int y, in drm_rect_init() argument
88 r->x1 = x; in drm_rect_init()
89 r->y1 = y; in drm_rect_init()
90 r->x2 = x + width; in drm_rect_init()
91 r->y2 = y + height; in drm_rect_init()
96 * @r: rectangle to be adjusted
100 * Change the size of rectangle @r by @dw in the horizontal direction,
102 * of @r stationary.
106 static inline void drm_rect_adjust_size(struct drm_rect *r, int dw, int dh) in drm_rect_adjust_size() argument
108 r->x1 -= dw >> 1; in drm_rect_adjust_size()
109 r->y1 -= dh >> 1; in drm_rect_adjust_size()
110 r->x2 += (dw + 1) >> 1; in drm_rect_adjust_size()
111 r->y2 += (dh + 1) >> 1; in drm_rect_adjust_size()
116 * @r: rectangle to be tranlated
120 * Move rectangle @r by @dx in the horizontal direction,
123 static inline void drm_rect_translate(struct drm_rect *r, int dx, int dy) in drm_rect_translate() argument
125 r->x1 += dx; in drm_rect_translate()
126 r->y1 += dy; in drm_rect_translate()
127 r->x2 += dx; in drm_rect_translate()
128 r->y2 += dy; in drm_rect_translate()
133 * @r: rectangle to be tranlated
137 * Move rectangle @r to @x in the horizontal direction,
140 static inline void drm_rect_translate_to(struct drm_rect *r, int x, int y) in drm_rect_translate_to() argument
142 drm_rect_translate(r, x - r->x1, y - r->y1); in drm_rect_translate_to()
147 * @r: rectangle to be downscaled
151 * Divide the coordinates of rectangle @r by @horz and @vert.
153 static inline void drm_rect_downscale(struct drm_rect *r, int horz, int vert) in drm_rect_downscale() argument
155 r->x1 /= horz; in drm_rect_downscale()
156 r->y1 /= vert; in drm_rect_downscale()
157 r->x2 /= horz; in drm_rect_downscale()
158 r->y2 /= vert; in drm_rect_downscale()
163 * @r: rectangle whose width is returned
168 static inline int drm_rect_width(const struct drm_rect *r) in drm_rect_width() argument
170 return r->x2 - r->x1; in drm_rect_width()
175 * @r: rectangle whose height is returned
180 static inline int drm_rect_height(const struct drm_rect *r) in drm_rect_height() argument
182 return r->y2 - r->y1; in drm_rect_height()
187 * @r: rectangle whose visibility is returned
192 static inline bool drm_rect_visible(const struct drm_rect *r) in drm_rect_visible() argument
194 return drm_rect_width(r) > 0 && drm_rect_height(r) > 0; in drm_rect_visible()
225 bool drm_rect_intersect(struct drm_rect *r, const struct drm_rect *clip);
235 const struct drm_rect *r, bool fixed_point);
236 void drm_rect_rotate(struct drm_rect *r,
239 void drm_rect_rotate_inv(struct drm_rect *r,