Skip to content

Mismatch in AeCairoSurface <-> Form round-trip conversion #35

@tinchodias

Description

@tinchodias

This is related to premultiplied alpha conversion, that Cairo surface in ARGB32 format requires, and Form not.

Repsoruce with:

f := Form extent: 1@1  depth: 32.
f fillColor: (Color red alpha: 0.4).
f colorAt: 0@0. "(Color r: 1.0 g: 0.0 b: 0.0 alpha: 0.4)"

s := AeCairoImageSurface fromForm: f.
s asForm colorAt: 0@0.  "(Color r: 0.3998044965786901 g: 0.0 b: 0.0 alpha: 0.4)"

the answer should be the same

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