Skip to content

Tile rendering causes edge distortion #157

@BingCoke

Description

@BingCoke

at dpr = 1 and scale = 180%, many of my PDF files exhibit this issue.

Image

in other scale like 240%

Image

After examining the logic for rendering pdfRect, it appears that the expected rendering position does not align with the actual one. This discrepancy arises because the final width and height are multiplied by the scale factor and then rounded, with the position calculated based on these rounded dimensions. While this rounding has no effect on regular tiles—since our tile sizes are integers—it becomes problematic for edge tiles. Due to the scale factor, the computed size of edge tiles is often a fractional value, causing their positions to shift slightly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions