示例#1
0
        internal static Vector GetZoomFactor(EditingContext context)
        {
            DesignerView designerView = DesignerView.FromContext(context);

            if (designerView == null)
            {
                return(new Vector(1.0, 1.0));
            }
            return(TransformUtil.GetScaleFromTransform(designerView.GetZoomTransform()));
        }
示例#2
0
        internal static double GetInvertZoom(DesignerView dview)
        {
            Vector scaleFromTransform = TransformUtil.GetScaleFromTransform(dview.GetZoomTransform());

            if (scaleFromTransform.X == 0.0)
            {
                return(0.0);
            }
            return(1.0 / scaleFromTransform.X);
        }
示例#3
0
 internal static Vector GetInvertZoomFactor(DesignerView dview)
 {
     return(VectorUtilities.InvertScale(TransformUtil.GetScaleFromTransform(dview.GetZoomTransform())));
 }