336 :(
const flutter::DlRoundRect&)clipDlRRect matrix:(
const flutter::DlMatrix&)matrix {
337 if (clipDlRRect.IsEmpty()) {
339 }
else if (clipDlRRect.IsRect()) {
340 [
self clipRect:clipDlRRect.GetBounds() matrix:matrix];
343 CGPathRef pathRef =
nullptr;
346 if (clipDlRRect.GetRadii().AreAllCornersSame()) {
348 auto radii = clipDlRRect.GetRadii();
350 CGPathCreateWithRoundedRect(clipRect, radii.top_left.width, radii.top_left.height, nil);
352 CGMutablePathRef mutablePathRef = CGPathCreateMutable();
354 flutter::DlRect clipDlRect = clipDlRRect.GetBounds();
355 auto left = clipDlRect.GetLeft();
356 auto top = clipDlRect.GetTop();
357 auto right = clipDlRect.GetRight();
358 auto bottom = clipDlRect.GetBottom();
359 flutter::DlRoundingRadii radii = clipDlRRect.GetRadii();
360 auto& top_left = radii.top_left;
361 auto& top_right = radii.top_right;
362 auto& bottom_left = radii.bottom_left;
363 auto& bottom_right = radii.bottom_right;
370 CGPathMoveToPoint(mutablePathRef, nil,
371 left + top_left.width, top);
373 CGPathAddLineToPoint(mutablePathRef, nil,
374 right - top_right.width, top);
375 CGPathAddCurveToPoint(mutablePathRef, nil,
377 right, top + top_right.height,
378 right, top + top_right.height);
380 CGPathAddLineToPoint(mutablePathRef, nil,
381 right, bottom - bottom_right.height);
382 CGPathAddCurveToPoint(mutablePathRef, nil,
384 right - bottom_right.width, bottom,
385 right - bottom_right.width, bottom);
387 CGPathAddLineToPoint(mutablePathRef, nil,
388 left + bottom_left.width, bottom);
389 CGPathAddCurveToPoint(mutablePathRef, nil,
391 left, bottom - bottom_left.height,
392 left, bottom - bottom_left.height);
394 CGPathAddLineToPoint(mutablePathRef, nil,
395 left, top + top_left.height);
396 CGPathAddCurveToPoint(mutablePathRef, nil,
398 left + top_left.width, top,
399 left + top_left.width, top);
400 CGPathCloseSubpath(mutablePathRef);
401 pathRef = mutablePathRef;
404 CATransform3D matrixInPoints =
409 paths_.push_back([
self getTransformedPath:pathRef matrix:matrixInPoints]);