Exemplo n.º 1
0
 /// <summary>
 /// 转换矩形
 /// </summary>
 /// <param name="val"></param>
 /// <param name="fromUnit"></param>
 /// <param name="toUnit"></param>
 /// <returns></returns>
 public static Rectangle Convert(Rectangle val, GraphicsUnit fromUnit, GraphicsUnit toUnit)
 {
     return(Convert(val, GraphicsDpis.UnitToDpi(fromUnit), GraphicsDpis.UnitToDpi(toUnit)));
 }
Exemplo n.º 2
0
 /// <summary>
 /// 转换点
 /// </summary>
 /// <param name="val"></param>
 /// <param name="fromUnit"></param>
 /// <param name="toUnit"></param>
 /// <returns></returns>
 public static PointF Convert(PointF val, GraphicsUnit fromUnit, GraphicsUnit toUnit)
 {
     return(Convert(val, GraphicsDpis.UnitToDpi(fromUnit), GraphicsDpis.UnitToDpi(toUnit)));
 }
Exemplo n.º 3
0
 /// <summary>
 /// 转换浮点数
 /// </summary>
 /// <param name="val"></param>
 /// <param name="fromUnit"></param>
 /// <param name="toUnit"></param>
 /// <returns></returns>
 public static float Convert(float val, GraphicsUnit fromUnit, GraphicsUnit toUnit)
 {
     return(Convert(val, GraphicsDpis.UnitToDpi(fromUnit), GraphicsDpis.UnitToDpi(toUnit)));
 }
Exemplo n.º 4
0
 /// <summary>
 /// 转换边距
 /// </summary>
 /// <param name="val"></param>
 /// <param name="fromUnit"></param>
 /// <param name="toUnit"></param>
 /// <returns></returns>
 public static Margins Convert(Margins val, GraphicsUnit fromUnit, GraphicsUnit toUnit)
 {
     return(Convert(val, GraphicsDpis.UnitToDpi(fromUnit), GraphicsDpis.UnitToDpi(toUnit)));
 }
Exemplo n.º 5
0
 /// <summary>
 /// 转换尺寸
 /// </summary>
 /// <param name="val"></param>
 /// <param name="fromUnit"></param>
 /// <param name="toUnit"></param>
 /// <returns></returns>
 public static Size Convert(Size val, GraphicsUnit fromUnit, GraphicsUnit toUnit)
 {
     return(Convert(val, GraphicsDpis.UnitToDpi(fromUnit), GraphicsDpis.UnitToDpi(toUnit)));
 }