using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace ryPrint.Mod
{
public class RySet
{
///
/// 毫米转像素
///
///
///
public static int MMtopixel(double mm)
{
return Convert.ToInt32(mm * 5);
}
///
/// 像素转毫米
///
///
///
public static float Pixeltomm(int pixel)
{
return pixel / 5f;
}
///
/// 毫米转英寸
///
///
public static float MMToInches(double mm)
{
return (float)(0.0393701 * mm);
}
///
/// 英寸转毫米
///
///
public static float InchesTomm(decimal Inches)
{
return (float)(Inches/0.0393701m);
}
public static string GetTruePath(string path)
{
return path.Replace("", Application.StartupPath);
}
}
}