298 CGPathRef pathRef = nullptr;
299 switch (clipSkRRect.
getType()) {
301 break;
302 }
304 [self clipRect:clipSkRRect.rect() matrix:matrix];
305 return;
306 }
312 break;
313 }
316 CGMutablePathRef mutablePathRef = CGPathCreateMutable();
317
323
324
325
326 CGPathMoveToPoint(mutablePathRef, nil, clipSkRect.
fLeft + topLeftRadii.
x(), clipSkRect.
fTop);
327
328 CGPathAddLineToPoint(mutablePathRef, nil, clipSkRect.
fRight - topRightRadii.
x(),
330 CGPathAddCurveToPoint(mutablePathRef, nil, clipSkRect.
fRight, clipSkRect.
fTop,
331 clipSkRect.
fRight, clipSkRect.
fTop + topRightRadii.
y(),
332 clipSkRect.
fRight, clipSkRect.
fTop + topRightRadii.
y());
333
334 CGPathAddLineToPoint(mutablePathRef, nil, clipSkRect.
fRight,
335 clipSkRect.
fBottom - bottomRightRadii.
y());
336 CGPathAddCurveToPoint(mutablePathRef, nil, clipSkRect.
fRight, clipSkRect.
fBottom,
339
340 CGPathAddLineToPoint(mutablePathRef, nil, clipSkRect.
fLeft + bottomLeftRadii.
x(),
342 CGPathAddCurveToPoint(mutablePathRef, nil, clipSkRect.
fLeft, clipSkRect.
fBottom,
345
346 CGPathAddLineToPoint(mutablePathRef, nil, clipSkRect.
fLeft,
347 clipSkRect.
fTop + topLeftRadii.
y());
348 CGPathAddCurveToPoint(mutablePathRef, nil, clipSkRect.
fLeft, clipSkRect.
fTop,
349 clipSkRect.
fLeft + topLeftRadii.
x(), clipSkRect.
fTop,
350 clipSkRect.
fLeft + topLeftRadii.
x(), clipSkRect.
fTop);
351 CGPathCloseSubpath(mutablePathRef);
352
353 pathRef = mutablePathRef;
354 break;
355 }
356 }
357
358 CATransform3D matrixInPoints =
360
361
362
363 [self addTransformedPath:pathRef matrix:matrixInPoints];
364}
SkVector getSimpleRadii() const
const SkRect & rect() const
SkVector radii(Corner corner) const
@ kOval_Type
non-zero width and height filled with radii
@ kSimple_Type
non-zero width and height with equal radii
@ kEmpty_Type
zero width or height
@ kNinePatch_Type
non-zero width and height with axis-aligned radii
@ kRect_Type
non-zero width and height, and zeroed radii
@ kComplex_Type
non-zero width and height with arbitrary radii
@ kUpperLeft_Corner
index of top-left corner radii
@ kLowerRight_Corner
index of bottom-right corner radii
@ kUpperRight_Corner
index of top-right corner radii
@ kLowerLeft_Corner
index of bottom-left corner radii
constexpr float y() const
constexpr float x() const
SkScalar fBottom
larger y-axis bounds
SkScalar fLeft
smaller x-axis bounds
SkScalar fRight
larger x-axis bounds
SkScalar fTop
smaller y-axis bounds