Results 1 to 2 of 2

Thread: how can a pixel be a floating point number

  1. #1
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default how can a pixel be a floating point number

    hi
    sometimes the pixels are calculated with floating point precison(ex.QPointF class)
    But, a pixel is always an interger value(ex:1024*768 pixels )

    if (0,0)represents 1st pixel in the screen(top left corner) then

    which pixel does (0.1,0.1) represent.

  2. #2
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how can a pixel be a floating point number

    Don't think in terms of pixels, think in terms of a coordinate plane. Your physical monitor may have integral pixels, but not every paint device is a monitor with integral dots. SVG and postscript are examples. Painter transforms also need floating point values.

Similar Threads

  1. Point to Pixel Calculation on all screen
    By patrik08 in forum General Programming
    Replies: 0
    Last Post: 3rd April 2008, 08:10
  2. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  3. How to get color of pixel or point by QMouseEvent
    By Krishnacins in forum Newbie
    Replies: 4
    Last Post: 28th May 2006, 01:46
  4. How to convert pixel to point & vs
    By Krishnacins in forum Qt Programming
    Replies: 1
    Last Post: 27th May 2006, 16:39
  5. Replies: 3
    Last Post: 20th April 2006, 11:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.