Ejemplo 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.
        }
Ejemplo n.º 2
0
 private void PropertiesForm_ScreenSizeChanged(object sender, ScreenSizeChangedEventArgs args)
 {
     SetPinboardSize();
 }
Ejemplo n.º 3
0
 private void PropertiesForm_ScreenSizeChanged(object sender, ScreenSizeChangedEventArgs args)
 {
     SetPinboardSize();
 }
Ejemplo n.º 4
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.
        }