New issue
Advanced search Search tips
Starred by 5 users
Status: Accepted
Area: Playback , Record
Priority: Medium
Type: Idea

Sign in to add a comment
SkPicture should have an offset/origin
Project Member Reported by, Aug 5 2014 Back to list
There are use cases (such as SkPictureImageFilter and Blink's
DisplayList) where the picture contains primitives which have a non-0,0
origin. They apply an offset transform at record time, and the inverse 
transform at playback time.

This seems common enough that it might be useful to be able to specify
an origin for SkPicture, so that any tiling performed on the contained
primitives starts at that origin rather than 0,0.

It could be a constructor which takes an SkIRect, or a setOrigin/setOffset
on SkPicture.

Failing that, we should add an offset to SkPictureImageFilter.
Project Member Comment 1 by, Aug 5 2014
Summary: SkPicture should have an offset/origin (was: SkPicture should have an offset)
Project Member Comment 2 by, Aug 5 2014
Note: for the tiling SkPictureShader use case (, it might be useful to make this an SkRect, rather than an SkIRect.
Project Member Comment 3 by, Oct 14 2014
Labels: -Type-Defect Type-Idea Area-Record Area-Playback
Now an idea for SkRecord I assume?
Project Member Comment 4 by, Oct 14 2014
Um, oddly enough, this is probably one aspect of SkPicture that SkRecord wouldn't be involved in, but spiritually sure.  "SkPicture should have an offset/origin" is still the best way to describe this.
Project Member Comment 5 by, Nov 22 2015
Pictures now have a rect-bounds, rather than just width/height. Does this resolve this issue?
Sign in to add a comment