Example #1
0
        internal static Vector GetZoomRounding(DesignerView dview)
        {
            Vector invertZoomFactor = DesignerUtilities.GetInvertZoomFactor(dview);

            invertZoomFactor.X = Math.Round(invertZoomFactor.X, 3);
            invertZoomFactor.Y = Math.Round(invertZoomFactor.Y, 3);
            return(invertZoomFactor);
        }
Example #2
0
 internal static void SetUseLayoutRounding(ModelItem selectedItem)
 {
     if (DesignerUtilities.UseRounding(selectedItem, (Dictionary <ModelItem, bool>)null))
     {
         DesignerUtilities.DesignerRoundingPrecision = 0;
     }
     else
     {
         DesignerUtilities.DesignerRoundingPrecision = 3;
     }
 }
Example #3
0
        internal static void SetUseLayoutRounding(IEnumerable <ModelItem> selectedItems)
        {
            bool flag = true;
            Dictionary <ModelItem, bool> cache = new Dictionary <ModelItem, bool>();

            foreach (ModelItem selectedItem in selectedItems)
            {
                flag = DesignerUtilities.UseRounding(selectedItem, cache);
                if (!flag)
                {
                    break;
                }
            }
            if (flag)
            {
                DesignerUtilities.DesignerRoundingPrecision = 0;
            }
            else
            {
                DesignerUtilities.DesignerRoundingPrecision = 3;
            }
        }
Example #4
0
 internal static Vector GetZoomRounding(EditingContext context)
 {
     return(DesignerUtilities.GetZoomRounding(DesignerView.FromContext(context)));
 }
Example #5
0
 internal static double GetInvertZoom(EditingContext context)
 {
     return(DesignerUtilities.GetInvertZoom(DesignerView.FromContext(context)));
 }