-
Notifications
You must be signed in to change notification settings - Fork 8
Description
It's unclear how we should reason about exposing the size of the element snapshots to script. There's 2 categories of APIs:
-
placeElement
anddrawElement
on 2D canvas where the author can ask to render the snapshot at a point (x, y). But it's ambiguous what should be at (x, y) since there can be multiple reference boxes to use from the box model, or the snapshot's size itself which can have overflow. For exampleplaceElement(element, 0, 0)
where the element has a shadow. For the snapshot to not clip, we need to talk in terms of the snapshot size.
One option is to make this configurable. -
The
texImage2D
style of API where the author gets back a texture for the element. In this case the texture size would be exposed to the author and would need to be the actual snapshot size. We could expose offsets into the snapshot for the reference boxes if needed.