개정판 547b5d56
issue #937: add ConverterLineSize
Change-Id: I7de85acb9d38c05af9f401283fb669eabaf7e857
FinalService/KCOM_FinalService/MarkupToPDF/Common/ConverterLineSize.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
|
|
6 |
namespace MarkupToPDF.Common |
|
7 |
{ |
|
8 |
public class ConverterLineSize |
|
9 |
{ |
|
10 |
private static double[] factors = new double[11]{0.5, 0.5, 0.5, 0.5, 0.4, 0.3, 0.3, 0.3, 0.2, 0.2, 0.2}; |
|
11 |
public static double Convert(int iLineSize) |
|
12 |
{ |
|
13 |
double factor = factors[iLineSize % 10]; |
|
14 |
/// WPF defines a device-independent pixel as 1 / 96 per inch |
|
15 |
/// iTextSharp : "the default for the size of the unit in default user space (1/72 inch) |
|
16 |
return iLineSize * 72 / 96 * factor; |
|
17 |
} |
|
18 |
} |
|
19 |
} |
내보내기 Unified diff