341 :(
const flutter::DlRoundRect&)clipDlRRect matrix:(
const flutter::DlMatrix&)matrix {
342 if (clipDlRRect.IsEmpty()) {
344 }
else if (clipDlRRect.IsRect()) {
345 [
self clipRect:clipDlRRect.GetBounds() matrix:matrix];
348 CGPathRef pathRef =
nullptr;
351 if (clipDlRRect.GetRadii().AreAllCornersSame()) {
353 auto radii = clipDlRRect.GetRadii();
355 CGPathCreateWithRoundedRect(clipRect, radii.top_left.width, radii.top_left.height, nil);
357 CGMutablePathRef mutablePathRef = CGPathCreateMutable();
359 flutter::DlRect clipDlRect = clipDlRRect.GetBounds();
360 auto left = clipDlRect.GetLeft();
361 auto top = clipDlRect.GetTop();
362 auto right = clipDlRect.GetRight();
363 auto bottom = clipDlRect.GetBottom();
364 flutter::DlRoundingRadii radii = clipDlRRect.GetRadii();
365 auto& top_left = radii.top_left;
366 auto& top_right = radii.top_right;
367 auto& bottom_left = radii.bottom_left;
368 auto& bottom_right = radii.bottom_right;
375 CGPathMoveToPoint(mutablePathRef, nil,
376 left + top_left.width, top);
378 CGPathAddLineToPoint(mutablePathRef, nil,
379 right - top_right.width, top);
380 CGPathAddCurveToPoint(mutablePathRef, nil,
382 right, top + top_right.height,
383 right, top + top_right.height);
385 CGPathAddLineToPoint(mutablePathRef, nil,
386 right, bottom - bottom_right.height);
387 CGPathAddCurveToPoint(mutablePathRef, nil,
389 right - bottom_right.width, bottom,
390 right - bottom_right.width, bottom);
392 CGPathAddLineToPoint(mutablePathRef, nil,
393 left + bottom_left.width, bottom);
394 CGPathAddCurveToPoint(mutablePathRef, nil,
396 left, bottom - bottom_left.height,
397 left, bottom - bottom_left.height);
399 CGPathAddLineToPoint(mutablePathRef, nil,
400 left, top + top_left.height);
401 CGPathAddCurveToPoint(mutablePathRef, nil,
403 left + top_left.width, top,
404 left + top_left.width, top);
405 CGPathCloseSubpath(mutablePathRef);
406 pathRef = mutablePathRef;
409 CATransform3D matrixInPoints =
414 paths_.push_back([
self getTransformedPath:pathRef matrix:matrixInPoints]);