//--------------------------------------
//               PowerUI
//
//        For documentation or 
//    if you have any issues, visit
//        powerUI.kulestar.com
//
//    Copyright  2013 Kulestar Ltd
//          www.kulestar.com
//--------------------------------------

using System;


namespace Css.Units{
	
	/// <summary>
	/// Represents an instance of dpcm units.
	/// </summary>
	
	public class DpcmUnit:ResolutionUnit{
		
		public override float DisplayNumber{
			get{
				return ( RawValue * 2.54f);
			}
		}
		
		public override string ToString(){
			return DisplayNumber+"dpcm";
		}
		
		public override void OnValueReady(CssLexer lexer){
			// Map to DPI:
			RawValue /= 2.54f;
		}
		
		protected override Value Clone(){
			DpcmUnit result=new DpcmUnit();
			result.RawValue=RawValue;
			return result;
		}
		
		public override string[] PostText{
			get{
				return new string[]{"dpcm"};
			}
		}
		
	}
	
}



