using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WordVisualizer.Core.Util
{
///
/// EmuUnit
///
public static class EmuUnit
{
///
/// Convert pixels to EMU
///
/// Size in pixels
/// Size in EMU
public static int PixelsToEmu(int pixels)
{
return (int)Math.Round((decimal)pixels * 9525);
}
///
/// Convert EMU to pixels
///
/// Size in EMU
/// Size in pixels
public static int EmuToPixels(int emu)
{
if (emu != 0)
{
return (int)Math.Round((decimal)emu / 9525);
}
else
{
return 0;
}
}
}
}