{"action":"opened","issue":{"url":"https://api.github.com/repos/tzachshabtay/MonoAGS/issues/169","repository_url":"https://api.github.com/repos/tzachshabtay/MonoAGS","labels_url":"https://api.github.com/repos/tzachshabtay/MonoAGS/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/tzachshabtay/MonoAGS/issues/169/comments","events_url":"https://api.github.com/repos/tzachshabtay/MonoAGS/issues/169/events","html_url":"https://github.com/tzachshabtay/MonoAGS/issues/169","id":267339853,"number":169,"title":"Scaling works incorrectly with Anchor?","user":{"login":"ivan-mogilko","id":1833754,"avatar_url":"https://avatars0.githubusercontent.com/u/1833754?v=4","gravatar_id":"","url":"https://api.github.com/users/ivan-mogilko","html_url":"https://github.com/ivan-mogilko","followers_url":"https://api.github.com/users/ivan-mogilko/followers","following_url":"https://api.github.com/users/ivan-mogilko/following{/other_user}","gists_url":"https://api.github.com/users/ivan-mogilko/gists{/gist_id}","starred_url":"https://api.github.com/users/ivan-mogilko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivan-mogilko/subscriptions","organizations_url":"https://api.github.com/users/ivan-mogilko/orgs","repos_url":"https://api.github.com/users/ivan-mogilko/repos","events_url":"https://api.github.com/users/ivan-mogilko/events{/privacy}","received_events_url":"https://api.github.com/users/ivan-mogilko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-21T01:14:25Z","updated_at":"2017-10-21T01:14:25Z","closed_at":null,"author_association":"NONE","body":"It seems to me that the scaling component implementation (AGSScale) treats Anchor incorrectly.\r\n\r\nDescription of an anchor sais: \"The units of the anchor point is in relation for the image size, where (0f,0f) is the bottom-left corner, and (1f,1f) is the top-right corner.\", which means (0.5f, 0.5f) is the center of image. That makes perfect sense.\r\n\r\nHowever, apparently scaling component treats (0,0) as the center of image.\r\n\r\nFor example: with default anchor (0.5, 0), scaling an object horizontally makes its image appear shifted to the left, proportionally to the scale value, while normally I'd expect it stay centered to the same position.\r\n\r\nAnother example, this is the flipping function in AGSScale:\r\n<code>\r\npublic void FlipHorizontally()\r\n{\r\n    ScaleBy(-ScaleX, ScaleY);\r\n    _image.Anchor = new PointF(-_image.Anchor.X, _image.Anchor.Y);\r\n    fireScaleChange();\r\n}\r\n</code>\r\nIf the image is centered, this will move image's pivot to beyond texture's boundaries?"}}
{"actor":{"display_login":"ivan-mogilko"}}