fun extractSubset(dst: Bitmap, subset: IRect): Boolean

Shares PixelRef with dst. Pixels are not copied; this and dst point to the same pixels; dst.getBounds() are set to the intersection of subset and the original getBounds().

subset may be larger than getBounds(). Any area outside of getBounds() is ignored.

Any contents of dst are discarded. isVolatile() setting is copied to dst. dst is set to getColorType(), getAlphaType(), and getColorSpace().

Return false if:

  • dst is null

  • PixelRef is null

  • subset does not intersect getBounds()


true if dst is replaced by subset



Bitmap set to subset


rectangle of pixels to reference

See also