Skip to content
  • Michael Natterer's avatar
    app: don't use PROJ_ROUND() for pixel-adjusting canvas item drawing · b7481132
    Michael Natterer authored
    When PROJ_ROUND()ing e.g. 3.8, it ends up at 4, then we added the 0.5
    offset to draw a nice cairo line in the middle of the pixel,
    effectively drawing a line that's meant to be at 3.8 at 4.5.  Instead,
    we now use floor(x)+0.5 now which snaps the above example to 3.5.
    
    Also, calculate arcs like we calculate rectangles (transform the arc's
    bounding box and pixel-align that, then recalculate the center), so
    arcs properly align with rectangles.
    b7481132