728x90
private int mmToPixel(float mm)
{
return (int)Math.Round(mm /0.254 );
}
private int PixelToCentimeter(int pixel)
{
return (int)(pixel * 2.54 / 96);
}
private int PtToCentimeter(int pt)
{
return (int)((double)pt / 3.0);
}
private int CentimeterToPt(int cm)
{
return (int)((double)cm * 3.0);
}
private static int mmToTwip(int mmValue)
{
return (int)(mmValue * 56.6929);
}
private static int twipToMm( int twipValue ) {
return (int)(twipValue / 56.6929);}
public float PixelsToTwipsX(float p, Graphics gSDG)
{
Graphics g = gSDG;
return (float) (p * (1440.0F / (double)g.DpiX));
g.Dispose();
}
public float PixelsToTwipsY(float p, Graphics gSDG)
{
Graphics g = gSDG;
return (float) (p * (1440.0F / (double)g.DpiY));
g.Dispose();
return 0;
}
public float TwipsToPixelsX(float t, Graphics gSDG)
{
Graphics g = gSDG;
return (float) (t / (double)(1440.0F / (double)g.DpiX));
g.Dispose();
}
public float TwipsToPixelsY(float t, Graphics gSDG)
{
Graphics g = gSDG;
return (float) (t / (double)(1440.0F / (double)g.DpiY));
g.Dispose();
}
|
728x90
'[2]SW Development Note > [2-1.2]C#' 카테고리의 다른 글
NET Framework의 해시함수 (0) | 2021.08.26 |
---|---|
시간은 없고 타이머의 종류는 많다 (0) | 2021.05.14 |
스레드의 파라미터 전달 (0) | 2021.05.08 |
SqlLite C.R.U.D Class (0) | 2021.05.08 |
DevExpress WizardControl 사용시 유의 사항. (0) | 2021.05.04 |
댓글