Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

How to specify uniform x, y scaling #2

Open
justvanrossum opened this issue Dec 9, 2020 · 1 comment
Open

How to specify uniform x, y scaling #2

justvanrossum opened this issue Dec 9, 2020 · 1 comment

Comments

@justvanrossum
Copy link
Contributor

In component transformations, we define ScaleX and ScaleY. Ideally only one should value be required when x and y scale are the same.

There are three options (the default scale factor is 1.0):

  1. Each value needs to be specified if it's different from the default. So when x == y and x != default, both need to be specified (this is the current situation, as implented by rcjktools).

  2. If ScaleY is missing, it should default to whatever ScaleX is. Downside: need two values if x != default and y == default

  3. If ScaleY is missing, it should default to whatever ScaleX is if a certain flag has been set, else default to 1.0.

Option 3 is most compact, but perhaps it is trying too hard to solve a relatively rare case. It may not be worth the added complexity.

I'm leaning towards option 2.

@behdad
Copy link

behdad commented Aug 22, 2022

I also like option two best. However then you get to the case where HaveScaleX is false but HaveScaleY is true and that's undefined. So the scheme needs to be renamed at least.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants