Meaning of less than 1 pixel



  • VectorStyle shows pixel values of less than 1 pixel. For example, I can make a rectangle be 100.3 pixels wide. Or, place it at 40.8 pixels horizontally. But 1 pixel is the smallest element on the display. So, what is the meaning, or interpretation, of values less than 1 pixel?

    A similar question applies to point values. I can understand point value increments of 0.5, there being 2 pixels to a point. But what is 0.3 points?

    It is possible my understanding of communicating with a display is too simplistic. I would appreciate anyone who can point me in the right direction towards understanding.


  • administrators

    @DMBrown All coordinates and sizes in VectorStyler are stored in real values of arbitrary precision (double floating precision). This limited to some fixed digits in settings for the UI.

    The meaning of this is multiple in vector graphics:

    • first, vector graphics can be scaled up/down so numbers change to different fractions.
    • effects distortions also result in arbitrary fractions for shape node positions.
    • exporting at some resolution also changes the actual pixel value.
    • and finally: sub-pixel rendering, VS splits each pixel to a number of "virtual" sub-pixels to result in smooth vector drawing (anti-aliasing), this splitting of a pixel can be set in Display Options or in View -> Subpixel

    The final display (or image export) will be rounded pixels, but how the smooth edges are combined into intermediate pixel colors is determined by fractional pixel positions.



  • @VectorStyler Thank you for the explanation. I suspected the precision might be related to internal calculations. I appreciate your time in confirming that is the case.