Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix negative scale and size being broken #985

Merged
merged 6 commits into from
Aug 21, 2017

Conversation

smoogipoo
Copy link
Contributor

No description provided.

@Tom94
Copy link
Collaborator

Tom94 commented Aug 21, 2017

Where is negative scale used? Does it work with autosize and masking? I don't think I considered that case when I wrote the code for these things.

@smoogipoo
Copy link
Contributor Author

Anywhere where "flipping" is desired, e.g. the catcher in osu!catch.

@Tom94
Copy link
Collaborator

Tom94 commented Aug 21, 2017

I'd like to see in this PR a test case where a negatively sized sprite is placed within an autosize container. This case should definitely be supported.

Another situation which we may want to support but might prove hard to do is negatively sized containers (with an without masking).

}
});

box2.ScaleTo(new Vector2(-1), 1000, Easing.InSine).Then().ScaleTo(new Vector2(1), 1000, Easing.InSine).Loop();

This comment was marked as off-topic.

This comment was marked as off-topic.

@smoogipoo
Copy link
Contributor Author

ok ready for a re-look through.

@@ -744,7 +744,10 @@ public Vector2 Scale

set
{
value = Vector2.ComponentMax(new Vector2(Precision.FLOAT_EPSILON), value);
if (Math.Abs(value.X) < Precision.FLOAT_EPSILON)
value.X = Precision.FLOAT_EPSILON;

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

Copy link
Collaborator

@Tom94 Tom94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the one comment I left I believe this is good to be merged in.

@Tom94 Tom94 merged commit 64cca05 into ppy:master Aug 21, 2017
@Tom94 Tom94 changed the title Fix scale brokenness Fix negative scale and size being broken Aug 21, 2017
@smoogipoo smoogipoo deleted the fix-scale-brokenness branch February 22, 2018 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants