Image placement edge cases #6979
sergei-grechanik
started this conversation in
General
Replies: 1 comment
-
Yes, the current behavior is expected. I have added some text to the spec for it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are a couple of edge cases when creating a placement, and the behavior doesn't seem to be documented, so I just want to confirm whether the current behavior is actually correct.
When both
r
andc
are specified, the image is stretched to occupy ac
xr
rectangle of cells. The edge case is when onlyr
orc
is specified: in this case the missing dimension is computed based on the corresponding image dimension in pixels, similarly to how it's done when neitherr
norc
is specified. The rest is the same.When specifying the source rectangle with
x,y,w,h
, if the bottom-right corner is out of bounds, it is truncated to the bottom-right corner of the image (personally, I expected it to create a large additional empty space).The script to reproduce:
Beta Was this translation helpful? Give feedback.
All reactions