2021-07-24 02:37:17 +00:00
|
|
|
package androidx.core.graphics;
|
|
|
|
|
|
|
|
import android.graphics.Canvas;
|
|
|
|
import android.graphics.Picture;
|
|
|
|
import d0.z.d.l;
|
|
|
|
import d0.z.d.m;
|
|
|
|
import kotlin.Unit;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
/* compiled from: Picture.kt */
|
|
|
|
public final class PictureKt {
|
|
|
|
public static final Picture record(Picture picture, int i, int i2, Function1<? super Canvas, Unit> function1) {
|
2021-09-21 07:33:49 +00:00
|
|
|
m.checkNotNullParameter(picture, "<this>");
|
|
|
|
m.checkNotNullParameter(function1, "block");
|
2021-07-24 02:37:17 +00:00
|
|
|
Canvas beginRecording = picture.beginRecording(i, i2);
|
2021-09-21 07:33:49 +00:00
|
|
|
m.checkNotNullExpressionValue(beginRecording, "beginRecording(width, height)");
|
2021-07-24 02:37:17 +00:00
|
|
|
int i3 = 1;
|
|
|
|
try {
|
|
|
|
function1.invoke(beginRecording);
|
|
|
|
return picture;
|
|
|
|
} finally {
|
|
|
|
l.finallyStart(i3);
|
|
|
|
picture.endRecording();
|
|
|
|
l.finallyEnd(i3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|