Skip to content

Incorrect output for translucent linear gradient #196

@coolbutuseless

Description

@coolbutuseless

ragg appears to not render translucent gradients correctly.

The following example was taken from https://www.stat.auckland.ac.nz/~paul/Reports/GraphicsEngine/definitions/definitions.html

Output from Cairo PNG

    grid.newpage()
    grid.text("Reveal", gp=gpar(fontface="bold", cex=3))
    grid.rect(gp=gpar(fill=linearGradient(c("white", "transparent"),
                                          x1=.2, x2=.8, y1=.5, y2=.5)))
    dev.off()

Expected output (from png(type = 'cairo'...)

Actual output from ragg::agg_png()

Nothing to see. the output PNG is totally white.

System

R4.5.0 on macOS

packageVersion('ragg')
[1] ‘1.4.0’

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