draw
Draws the recording onto destination at x, y, under this layer's transform and alpha. Draws nothing while this layer has no content.
A recording made aligned to a destination is drawn in device pixels: destination's transform is replaced by one that puts the recording's origin on the device pixel it was recorded at, and x, y and this layer's transform apply from there, in device pixels. At the defaults it lands on exactly the pixels it was recorded for.
The recording occupies its size whatever the scale it was recorded at. As androidx's GraphicsLayer does, the recording is scaled by scaleX and scaleY, then turned by rotationZ, both about pivotOffset, then moved by translationX and translationY. The drawing runs on a copy of destination: the destination's transform, composite and rendering hints are left exactly as they were found.
A layer holds pixels rather than the drawing that made them, so a transform here - this layer's own or, for a recording not aligned to a destination, one destination already carries - resamples those pixels. Drawing a recording larger than it was recorded softens it; to enlarge it crisply, record it again at the record scale you want it drawn at.
The recording is drawn with renderEffect applied, before this layer's transform, so the effect moves, turns and fades with it.
alpha multiplies into the translucency destination already carries rather than replacing it, so a layer drawn into a graphics a caller is fading fades with everything else there.
Parameters
the graphics to draw onto.
the horizontal position of the recording's origin, before translationX. Defaults to 0.
the vertical position of the recording's origin, before translationY. Defaults to 0.