Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
P
poppler
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 613
    • Issues 613
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 39
    • Merge Requests 39
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • poppler
  • poppler
  • Merge Requests
  • !89

Open
Opened Oct 22, 2018 by Jehan Pagès@Jehan
  • Report abuse
Report abuse

Fix setting antialiasing by editing Cairo context.

  • Overview 14
  • Commits 1
  • Pipelines 4
  • Changes 1

Some context: I am a GIMP developer, and importing PDF with antialiasing broke. After looking at your code, I realize you are always overriding the antialiasing in the Cairo context. This made sense for the CLI tool (for which I see you made this change), but not for people using the glib API as we simply create a cairo context, set it however we like and run poppler_page_render(). This used to work for years, but now this is broken.

So here is a fix. :-)

Thanks!

Commit 853e9499 added setAntialias() to CairoOutputDev, in particular to allow setting up antialiasing on the pdftocairo utils through a CLI option (-antialias). Unfortunately this broke applications which used the glib API and used to simply set the antialiasing through the Cairo context, and now always get the default antialiasing (even if we added a new API, it would break API behavior and simplicity).

Instead only use the antialias member if it is set to non-default, which means it has been changed explicitly by some means. Keep the cairo context as-is otherwise.

Edited Oct 29, 2018 by Jehan Pagès
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: poppler/poppler!89
Source branch: master