daily pastebin goal
51%
SHARE
TWEET

ZIUUUUUM, v. 2

a guest Mar 19th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private double ModifiedImageZoomTransform = 1, ModifiedImageXTransform = 0.5, ModifiedImageYTransform = 0.5;
  2. (...)
  3. private void ZoomSliderValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
  4.         {
  5.             ModifiedImageZoomTransform = e.NewValue;
  6.             ImageModified.RenderTransformOrigin = new Point(ModifiedImageXTransform, ModifiedImageYTransform);
  7.             ImageModified.RenderTransform = new ScaleTransform(e.NewValue, e.NewValue);
  8.         }
  9.         private void PanXSliderValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
  10.         {
  11.             ModifiedImageXTransform = e.NewValue;
  12.             ImageModified.RenderTransformOrigin = new Point(ModifiedImageXTransform, ModifiedImageYTransform);
  13.             ImageModified.RenderTransform = new ScaleTransform(ModifiedImageZoomTransform, ModifiedImageZoomTransform);
  14.         }
  15.         private void PanYSliderValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
  16.         {
  17.             ModifiedImageYTransform = e.NewValue;
  18.             ImageModified.RenderTransformOrigin = new Point(ModifiedImageXTransform, ModifiedImageYTransform);
  19.             ImageModified.RenderTransform = new ScaleTransform(ModifiedImageZoomTransform, ModifiedImageZoomTransform);
  20.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top