Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Units of Measure
posted

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

Parents
No Data
Reply
  • 37774
    posted

     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

Children
No Data