Skip to content

Commit d3acfb3

Browse files
authored
Merge pull request #40 from dotnet-campus/t/wzd/SupportMoreToPixel
支持更多的单位转Pixel
2 parents 96313c1 + a17e4c8 commit d3acfb3

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)