Lines Matching full:r
53 * @r: rectangle struct
55 #define DRM_RECT_ARG(r) drm_rect_width(r), drm_rect_height(r), (r)->x1, (r)->y1 argument
63 * @r: rectangle struct
68 #define DRM_RECT_FP_ARG(r) \ argument
69 drm_rect_width(r) >> 16, ((drm_rect_width(r) & 0xffff) * 15625) >> 10, \
70 drm_rect_height(r) >> 16, ((drm_rect_height(r) & 0xffff) * 15625) >> 10, \
71 (r)->x1 >> 16, (((r)->x1 & 0xffff) * 15625) >> 10, \
72 (r)->y1 >> 16, (((r)->y1 & 0xffff) * 15625) >> 10
76 * @r: rectangle
82 static inline void drm_rect_init(struct drm_rect *r, int x, int y, in drm_rect_init() argument
85 r->x1 = x; in drm_rect_init()
86 r->y1 = y; in drm_rect_init()
87 r->x2 = x + width; in drm_rect_init()
88 r->y2 = y + height; in drm_rect_init()
93 * @r: rectangle to be adjusted
97 * Change the size of rectangle @r by @dw in the horizontal direction,
99 * of @r stationary.
103 static inline void drm_rect_adjust_size(struct drm_rect *r, int dw, int dh) in drm_rect_adjust_size() argument
105 r->x1 -= dw >> 1; in drm_rect_adjust_size()
106 r->y1 -= dh >> 1; in drm_rect_adjust_size()
107 r->x2 += (dw + 1) >> 1; in drm_rect_adjust_size()
108 r->y2 += (dh + 1) >> 1; in drm_rect_adjust_size()
113 * @r: rectangle to be tranlated
117 * Move rectangle @r by @dx in the horizontal direction,
120 static inline void drm_rect_translate(struct drm_rect *r, int dx, int dy) in drm_rect_translate() argument
122 r->x1 += dx; in drm_rect_translate()
123 r->y1 += dy; in drm_rect_translate()
124 r->x2 += dx; in drm_rect_translate()
125 r->y2 += dy; in drm_rect_translate()
130 * @r: rectangle to be tranlated
134 * Move rectangle @r to @x in the horizontal direction,
137 static inline void drm_rect_translate_to(struct drm_rect *r, int x, int y) in drm_rect_translate_to() argument
139 drm_rect_translate(r, x - r->x1, y - r->y1); in drm_rect_translate_to()
144 * @r: rectangle to be downscaled
148 * Divide the coordinates of rectangle @r by @horz and @vert.
150 static inline void drm_rect_downscale(struct drm_rect *r, int horz, int vert) in drm_rect_downscale() argument
152 r->x1 /= horz; in drm_rect_downscale()
153 r->y1 /= vert; in drm_rect_downscale()
154 r->x2 /= horz; in drm_rect_downscale()
155 r->y2 /= vert; in drm_rect_downscale()
160 * @r: rectangle whose width is returned
165 static inline int drm_rect_width(const struct drm_rect *r) in drm_rect_width() argument
167 return r->x2 - r->x1; in drm_rect_width()
172 * @r: rectangle whose height is returned
177 static inline int drm_rect_height(const struct drm_rect *r) in drm_rect_height() argument
179 return r->y2 - r->y1; in drm_rect_height()
184 * @r: rectangle whose visibility is returned
189 static inline bool drm_rect_visible(const struct drm_rect *r) in drm_rect_visible() argument
191 return drm_rect_width(r) > 0 && drm_rect_height(r) > 0; in drm_rect_visible()
209 bool drm_rect_intersect(struct drm_rect *r, const struct drm_rect *clip);
219 const struct drm_rect *r, bool fixed_point);
220 void drm_rect_rotate(struct drm_rect *r,
223 void drm_rect_rotate_inv(struct drm_rect *r,