Skip to content

Commit a17e4c8

Browse files
committed
支持更多的单位转Pixel
1 parent 96313c1 commit a17e4c8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/dotnetCampus.OpenXmlUnitConverter/UnitConverter.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ public static PixelPercentage ToPixelPercentage(this EmuPercentage emuPercentage
4242

4343
public static Pixel ToPixel(this Inch inch) => inch.ToEmu().ToPixel();
4444

45+
public static Pixel ToPixel(this Cm cm) => cm.ToEmu().ToPixel();
46+
47+
public static Pixel ToPixel(this Mm mm) => mm.ToEmu().ToPixel();
48+
4549
public static Inch ToInch(this Pixel pixel) => pixel.ToEmu().ToInch();
4650

4751
#endregion

0 commit comments

Comments
 (0)