Esempio n. 1
0
        private void PropertiesForm_ScreenSizeChanged(object sender, ScreenSizeChangedEventArgs args)
        {
            // TODO: Move this into a Resize menu item
            SizeF scale = new SizeF(
                (float)Data.ScreenRectInfo.Size.Width / args.OldSize.Width,
                (float)Data.ScreenRectInfo.Size.Height / args.OldSize.Height);

            foreach (var rectInfo in Data.RectInfos)
            {
                rectInfo.X      = (int)(rectInfo.X * scale.Width);
                rectInfo.Y      = (int)(rectInfo.Y * scale.Height);
                rectInfo.Width  = (int)(rectInfo.Width * scale.Width);
                rectInfo.Height = (int)(rectInfo.Height * scale.Height);
            }

            // NOTE: Buffer and data MUST already be marked as dirty elsewhere.
        }
Esempio n. 2
0
 private void PropertiesForm_ScreenSizeChanged(object sender, ScreenSizeChangedEventArgs args)
 {
     SetPinboardSize();
 }
Esempio n. 3
0
 private void PropertiesForm_ScreenSizeChanged(object sender, ScreenSizeChangedEventArgs args)
 {
     SetPinboardSize();
 }
        private void PropertiesForm_ScreenSizeChanged(object sender, ScreenSizeChangedEventArgs args)
        {
            // TODO: Move this into a Resize menu item
            SizeF scale = new SizeF(
                (float)Data.ScreenRectInfo.Size.Width / args.OldSize.Width,
                (float)Data.ScreenRectInfo.Size.Height / args.OldSize.Height);

            foreach (var rectInfo in Data.RectInfos)
            {
                rectInfo.X = (int)(rectInfo.X * scale.Width);
                rectInfo.Y = (int)(rectInfo.Y * scale.Height);
                rectInfo.Width = (int)(rectInfo.Width * scale.Width);
                rectInfo.Height = (int)(rectInfo.Height * scale.Height);
            }

            // NOTE: Buffer and data MUST already be marked as dirty elsewhere.
        }