Home | History | Annotate | Download | only in vega

Lines Matching refs:coords

194 static INLINE void vg_shift_rectx(VGfloat coords[4],
198 coords[0] += shift;
199 coords[2] -= shift;
201 coords[2] = MIN2(coords[2], bounds[2]);
203 if ((coords[0] + coords[2]) > (bounds[0] + bounds[2])) {
204 coords[2] = (bounds[0] + bounds[2]) - coords[0];
209 static INLINE void vg_shift_recty(VGfloat coords[4],
213 coords[1] += shift;
214 coords[3] -= shift;
216 coords[3] = MIN2(coords[3], bounds[3]);
217 if ((coords[1] + coords[3]) > (bounds[1] + bounds[3])) {
218 coords[3] = (bounds[1] + bounds[3]) - coords[1];
223 static INLINE void vg_bound_rect(VGfloat coords[4],
228 if (coords[0] > (bounds[0] + bounds[2]) ||
229 coords[1] > (bounds[1] + bounds[3]) ||
230 (coords[0] + coords[2]) < bounds[0] ||
231 (coords[1] + coords[3]) < bounds[1]) {
232 coords[0] = 0.f;
233 coords[1] = 0.f;
234 coords[2] = 0.f;
235 coords[3] = 0.f;
242 if (coords[0] < bounds[0]) {
243 shift[0] = bounds[0] - coords[0];
244 coords[2] -= shift[0];
245 coords[0] = bounds[0];
250 if (coords[1] < bounds[1]) {
251 shift[1] = bounds[1] - coords[1];
252 coords[3] -= shift[1];
253 coords[1] = bounds[1];
257 shift[2] = bounds[2] - coords[2];
258 shift[3] = bounds[3] - coords[3];
260 coords[2] = MIN2(coords[2], bounds[2]);
261 coords[3] = MIN2(coords[3], bounds[3]);
264 if ((coords[0] + coords[2]) > (bounds[0] + bounds[2])) {
265 coords[2] = (bounds[0] + bounds[2]) - coords[0];
267 if ((coords[1] + coords[3]) > (bounds[1] + bounds[3])) {
268 coords[3] = (bounds[1] + bounds[3]) - coords[1];
272 if ((coords[0] + coords[2]) < bounds[0] ||
273 (coords[1] + coords[3]) < bounds[1]) {
274 coords[0] = 0.f;
275 coords[1] = 0.f;
276 coords[2] = 0.f;
277 coords[3] = 0.f;