Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[proposal] Make origin_x and origin_y independent of picture size #554
Right now origin_x and origin_y are very useful to place images, but not so useful for scaling: let's say you want to place a picture in the middle of the layout:
this works perfectly, but let's say I want to scale the picture, a command like
doesn't work well because the center of scaling is still locked at 200 pixels. So I'll have to explicitly reposition the image center, for example with a function like this:
It would be nice to be able to define a "relative_origin_x" and "relative_origin_y" as fractional values from 0 to 1, so that, for example, 0.5 and 0,5 keeps the image centered even when changing the scale.