Lines Matching refs:dy
291 /** Returns SkIRect offset by (dx, dy).
295 If dy is negative, SkIRect returned is moved upward.
296 If dy is positive, SkIRect returned is moved downward.
299 @param dy offset added to fTop and fBottom
300 @return SkIRect offset by dx and dy, with original width and height
302 constexpr SkIRect makeOffset(int32_t dx, int32_t dy) const {
304 Sk32_sat_add(fLeft, dx), Sk32_sat_add(fTop, dy),
305 Sk32_sat_add(fRight, dx), Sk32_sat_add(fBottom, dy),
323 /** Returns SkIRect, inset by (dx, dy).
327 If dy is negative, SkIRect returned is taller.
328 If dy is positive, SkIRect returned is shorter.
331 @param dy offset added to fTop and subtracted from fBottom
334 SkIRect makeInset(int32_t dx, int32_t dy) const {
336 Sk32_sat_add(fLeft, dx), Sk32_sat_add(fTop, dy),
337 Sk32_sat_sub(fRight, dx), Sk32_sat_sub(fBottom, dy),
341 /** Returns SkIRect, outset by (dx, dy).
345 If dy is negative, SkIRect returned is shorter.
346 If dy is positive, SkIRect returned is taller.
349 @param dy offset subtracted to fTop and added from fBottom
352 SkIRect makeOutset(int32_t dx, int32_t dy) const {
354 Sk32_sat_sub(fLeft, dx), Sk32_sat_sub(fTop, dy),
355 Sk32_sat_add(fRight, dx), Sk32_sat_add(fBottom, dy),
359 /** Offsets SkIRect by adding dx to fLeft, fRight; and by adding dy to fTop, fBottom.
363 If dy is negative, moves SkIRect returned upward.
364 If dy is positive, moves SkIRect returned downward.
367 @param dy offset added to fTop and fBottom
369 void offset(int32_t dx, int32_t dy) {
371 fTop = Sk32_sat_add(fTop, dy);
373 fBottom = Sk32_sat_add(fBottom, dy);
403 /** Insets SkIRect by (dx,dy).
407 If dy is positive, makes SkIRect shorter.
408 If dy is negative, makes SkIRect taller.
411 @param dy offset added to fTop and subtracted from fBottom
413 void inset(int32_t dx, int32_t dy) {
415 fTop = Sk32_sat_add(fTop, dy);
417 fBottom = Sk32_sat_sub(fBottom, dy);
420 /** Outsets SkIRect by (dx, dy).
424 If dy is positive, makes SkIRect taller.
425 If dy is negative, makes SkIRect shorter.
428 @param dy subtracted to fTop and added from fBottom
430 void outset(int32_t dx, int32_t dy) { this->inset(-dx, -dy); }
964 /** Returns SkRect offset by (dx, dy).
968 If dy is negative, SkRect returned is moved upward.
969 If dy is positive, SkRect returned is moved downward.
972 @param dy added to fTop and fBottom
975 constexpr SkRect makeOffset(SkScalar dx, SkScalar dy) const {
976 return MakeLTRB(fLeft + dx, fTop + dy, fRight + dx, fBottom + dy);
986 /** Returns SkRect, inset by (dx, dy).
990 If dy is negative, SkRect returned is taller.
991 If dy is positive, SkRect returned is shorter.
994 @param dy added to fTop and subtracted from fBottom
997 SkRect makeInset(SkScalar dx, SkScalar dy) const {
998 return MakeLTRB(fLeft + dx, fTop + dy, fRight - dx, fBottom - dy);
1001 /** Returns SkRect, outset by (dx, dy).
1005 If dy is negative, SkRect returned is shorter.
1006 If dy is positive, SkRect returned is taller.
1009 @param dy subtracted to fTop and added from fBottom
1012 SkRect makeOutset(SkScalar dx, SkScalar dy) const {
1013 return MakeLTRB(fLeft - dx, fTop - dy, fRight + dx, fBottom + dy);
1016 /** Offsets SkRect by adding dx to fLeft, fRight; and by adding dy to fTop, fBottom.
1020 If dy is negative, moves SkRect upward.
1021 If dy is positive, moves SkRect downward.
1024 @param dy offset added to fTop and fBottom
1026 void offset(SkScalar dx, SkScalar dy) {
1028 fTop += dy;
1030 fBottom += dy;
1060 /** Insets SkRect by (dx, dy).
1064 If dy is positive, makes SkRect shorter.
1065 If dy is negative, makes SkRect taller.
1068 @param dy added to fTop and subtracted from fBottom
1070 void inset(SkScalar dx, SkScalar dy) {
1072 fTop += dy;
1074 fBottom -= dy;
1077 /** Outsets SkRect by (dx, dy).
1081 If dy is positive, makes SkRect taller.
1082 If dy is negative, makes SkRect shorter.
1085 @param dy subtracted to fTop and added from fBottom
1087 void outset(SkScalar dx, SkScalar dy) { this->inset(-dx, -dy); }