CanvasKt

public final class CanvasKt


Summary

Public methods

static final void
CanvasKt.withClip(
    @NonNull Canvas receiver,
    @NonNull Rect clipRect,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.clipRect and Canvas.restoreToCount.

static final void
CanvasKt.withClip(
    @NonNull Canvas receiver,
    @NonNull RectF clipRect,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.clipRect and Canvas.restoreToCount.

static final void
CanvasKt.withClip(
    @NonNull Canvas receiver,
    int left,
    int top,
    int right,
    int bottom,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.clipRect and Canvas.restoreToCount.

static final void
CanvasKt.withClip(
    @NonNull Canvas receiver,
    float left,
    float top,
    float right,
    float bottom,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.clipRect and Canvas.restoreToCount.

static final void
CanvasKt.withClip(
    @NonNull Canvas receiver,
    @NonNull Path clipPath,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.clipPath and Canvas.restoreToCount.

static final void
CanvasKt.withMatrix(
    @NonNull Canvas receiver,
    @NonNull Matrix matrix,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.concat and Canvas.restoreToCount.

static final void
CanvasKt.withRotation(
    @NonNull Canvas receiver,
    float degrees,
    float pivotX,
    float pivotY,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.rotate and Canvas.restoreToCount.

static final void
CanvasKt.withSave(
    @NonNull Canvas receiver,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save and Canvas.restoreToCount.

static final void
CanvasKt.withScale(
    @NonNull Canvas receiver,
    float x,
    float y,
    float pivotX,
    float pivotY,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.scale and Canvas.restoreToCount.

static final void
CanvasKt.withSkew(
    @NonNull Canvas receiver,
    float x,
    float y,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.skew and Canvas.restoreToCount.

static final void
CanvasKt.withTranslation(
    @NonNull Canvas receiver,
    float x,
    float y,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.translate and Canvas.restoreToCount.

Public methods

CanvasKt.withClip

@NonNull
public static final void CanvasKt.withClip(
    @NonNull Canvas receiver,
    @NonNull Rect clipRect,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.clipRect and Canvas.restoreToCount.

CanvasKt.withClip

@NonNull
public static final void CanvasKt.withClip(
    @NonNull Canvas receiver,
    @NonNull RectF clipRect,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.clipRect and Canvas.restoreToCount.

CanvasKt.withClip

@NonNull
public static final void CanvasKt.withClip(
    @NonNull Canvas receiver,
    int left,
    int top,
    int right,
    int bottom,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.clipRect and Canvas.restoreToCount.

CanvasKt.withClip

@NonNull
public static final void CanvasKt.withClip(
    @NonNull Canvas receiver,
    float left,
    float top,
    float right,
    float bottom,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.clipRect and Canvas.restoreToCount.

CanvasKt.withClip

@NonNull
public static final void CanvasKt.withClip(
    @NonNull Canvas receiver,
    @NonNull Path clipPath,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.clipPath and Canvas.restoreToCount.

CanvasKt.withMatrix

@NonNull
public static final void CanvasKt.withMatrix(
    @NonNull Canvas receiver,
    @NonNull Matrix matrix,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.concat and Canvas.restoreToCount.

CanvasKt.withRotation

@NonNull
public static final void CanvasKt.withRotation(
    @NonNull Canvas receiver,
    float degrees,
    float pivotX,
    float pivotY,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.rotate and Canvas.restoreToCount.

CanvasKt.withSave

@NonNull
public static final void CanvasKt.withSave(
    @NonNull Canvas receiver,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save and Canvas.restoreToCount.

CanvasKt.withScale

@NonNull
public static final void CanvasKt.withScale(
    @NonNull Canvas receiver,
    float x,
    float y,
    float pivotX,
    float pivotY,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.scale and Canvas.restoreToCount.

CanvasKt.withSkew

@NonNull
public static final void CanvasKt.withSkew(
    @NonNull Canvas receiver,
    float x,
    float y,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.skew and Canvas.restoreToCount.

CanvasKt.withTranslation

@NonNull
public static final void CanvasKt.withTranslation(
    @NonNull Canvas receiver,
    float x,
    float y,
    @NonNull Function1<@NonNull CanvasUnit> block
)

Wrap the specified block in calls to Canvas.save/Canvas.translate and Canvas.restoreToCount.