I'm trying to determine the relationship between pixels and units of measure like inches and centimeters.
All throughout the documentation the positioning of objects in the report, padding, margins, etc. are all specified in pixels. But how big is a pixel?
I'm writing a reporting framework which is a facade. The concrete implementation of the facade will be a link to Infragistics.Documents. In my facade I measure everything in inches. A page is 8.5 x 11 inches, and this is a no brainer, but after that, how do I transform my inches into pixels?
- Ian
Ian,
I think that most of the units of measure in the Documents assembly are actually in Points, not Pixels; there is a method on Infragistics.Documents.Utils.Converter.PixelsToPoints that you can use for this. To answer your original question, though, I believe that it is not as simple to convert inches to pixels, since this tends to depend on dots per inch (DPI, also referred to as PPI - pixels per inch) of your current monitor. You may be able to hard-code a value of 96dpi, though I'm not certain about this.
-Matt