extractAlpha

Sets dst to alpha described by pixels. Returns false if dst cannot be written to or dst pixels cannot be allocated.

Return

true if alpha layer was not constructed in dst PixelRef

Parameters

dst

holds PixelRef to fill with alpha layer


fun extractAlpha(dst: Bitmap, paint: Paint?): IPoint?

Sets dst to alpha described by pixels. Returns false if dst cannot be written to or dst pixels cannot be allocated.

If paint is not null and contains MaskFilter, MaskFilter generates mask alpha from Bitmap. Returns offset to top-left position for dst for alignment with Bitmap; (0, 0) unless MaskFilter generates mask.

Return

null if alpha layer was not constructed in dst PixelRef, IPoint otherwise

Parameters

dst

holds PixelRef to fill with alpha layer

paint

holds optional MaskFilter; may be null