Ejemplo n.º 1
0
        private Vector ScaleVectorFromSize(System.Drawing.Size screenSize_in, System.Drawing.Size absoluteSize_in)
        {
            Matrix scale = new Matrix();

            scale.SetIdentity();
            scale.Scale(1.0 / screenSize_in.Width, 1.0 / screenSize_in.Height);

            return(scale.Transform(absoluteSize_in.ToVector()));
        }
Ejemplo n.º 2
0
        private System.Drawing.Size CalculateSize(System.Drawing.Size screenSize_in, Vector scaleVector_in)
        {
            Matrix scale = new Matrix();

            scale.SetIdentity();
            scale.Scale(scaleVector_in.X, scaleVector_in.Y);

            return(scale.Transform(screenSize_in.ToVector()).ToSize());
        }