Skip to content
  • Friedrich W. H. Kossebau's avatar
    GeoPainter: consistent qreal-based API, separate regionFromPixmapRect() · c1830845
    Friedrich W. H. Kossebau authored
    Summary:
    GeoPainter API had a mixture of int and qreal-based methods, and internally
    was inconsistently relaying to int or qreal-based QPainter methods.
    
    Regions used for painting rects and ellipses depend on whether anti-aliasing
    is enabled or not, and can result in offsets of at least 1 pixel.
    So calculations now tries to respect that.
    
    GeoPainter::regionFromRect() was used for getting the region of pixmaps
    being rendered. Especially in non-anti-aliased mode though this does not
    match, also is there no stroke-width on painting pixmaps.
    A special GeoPainter::regionFromPixmapRect() should serve that purpose now.
    
    Reviewers: nienhueser, shentey, rahn, #marble
    
    Reviewed By: rahn, #marble
    
    Differential Revision: https://phabricator.kde.org/D2279
    c1830845