Lines Matching refs:dx

291     /** Returns SkIRect offset by (dx, dy).
293 If dx is negative, SkIRect returned is moved to the left.
294 If dx is positive, SkIRect returned is moved to the right.
298 @param dx offset added to fLeft and fRight
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).
325 If dx is negative, SkIRect returned is wider.
326 If dx is positive, SkIRect returned is narrower.
330 @param dx offset added to fLeft and subtracted from fRight
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).
343 If dx is negative, SkIRect returned is narrower.
344 If dx is positive, SkIRect returned is wider.
348 @param dx offset subtracted to fLeft and added from fRight
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.
361 If dx is negative, moves SkIRect returned to the left.
362 If dx is positive, moves SkIRect returned to the right.
366 @param dx offset added to fLeft and fRight
369 void offset(int32_t dx, int32_t dy) {
370 fLeft = Sk32_sat_add(fLeft, dx);
372 fRight = Sk32_sat_add(fRight, dx);
403 /** Insets SkIRect by (dx,dy).
405 If dx is positive, makes SkIRect narrower.
406 If dx is negative, makes SkIRect wider.
410 @param dx offset added to fLeft and subtracted from fRight
413 void inset(int32_t dx, int32_t dy) {
414 fLeft = Sk32_sat_add(fLeft, dx);
416 fRight = Sk32_sat_sub(fRight, dx);
420 /** Outsets SkIRect by (dx, dy).
422 If dx is positive, makes SkIRect wider.
423 If dx is negative, makes SkIRect narrower.
427 @param dx subtracted to fLeft and added from fRight
430 void outset(int32_t dx, int32_t dy) { this->inset(-dx, -dy); }
964 /** Returns SkRect offset by (dx, dy).
966 If dx is negative, SkRect returned is moved to the left.
967 If dx is positive, SkRect returned is moved to the right.
971 @param dx added to fLeft and fRight
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).
988 If dx is negative, SkRect returned is wider.
989 If dx is positive, SkRect returned is narrower.
993 @param dx added to fLeft and subtracted from fRight
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).
1003 If dx is negative, SkRect returned is narrower.
1004 If dx is positive, SkRect returned is wider.
1008 @param dx subtracted to fLeft and added from fRight
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.
1018 If dx is negative, moves SkRect to the left.
1019 If dx is positive, moves SkRect to the right.
1023 @param dx offset added to fLeft and fRight
1026 void offset(SkScalar dx, SkScalar dy) {
1027 fLeft += dx;
1029 fRight += dx;
1060 /** Insets SkRect by (dx, dy).
1062 If dx is positive, makes SkRect narrower.
1063 If dx is negative, makes SkRect wider.
1067 @param dx added to fLeft and subtracted from fRight
1070 void inset(SkScalar dx, SkScalar dy) {
1071 fLeft += dx;
1073 fRight -= dx;
1077 /** Outsets SkRect by (dx, dy).
1079 If dx is positive, makes SkRect wider.
1080 If dx is negative, makes SkRect narrower.
1084 @param dx subtracted to fLeft and added from fRight
1087 void outset(SkScalar dx, SkScalar dy) { this->inset(-dx, -dy); }