Skip to content

Instantly share code, notes, and snippets.

@jdstanhope
Created October 18, 2010 23:24
Show Gist options
  • Save jdstanhope/633281 to your computer and use it in GitHub Desktop.
Save jdstanhope/633281 to your computer and use it in GitHub Desktop.
A transform between a Silverlight Page and the Farseer World
var pageToWorld = new CompositeTransform();
pageToWorld.CenterX = ActualWidth/2;
pageToWorld.CenterY = ActionHeight/2;
pageToWorld.ScaleX = 1/100;
pageToWorld.ScaleY = -1/100;
pageToWorld.TranslateX = - ActionWidth/2;
pageToWorld.TranslateY = - ActualHeight/2;
var worldToPage = pageToWorld.Inverse;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment