Skip to content

opacity does not affect text #15

@fryguybob

Description

@fryguybob

(Imported from http://code.google.com/p/diagrams/issues/detail?id=78. Original issue from [email protected] on April 5, 2012, 02:09:03 AM UTC)

Consider the following code:

{-# LANGUAGE NoMonomorphismRestriction #-}

import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine

import Data.Colour

t1 = text "H" # fcA (black withOpacity 0.5) <> square 1 # lw 0

t2 = text "H" # opacity 0.5 <> square 1 # lw 0

main = defaultMain (t1 ||| t2)

I would expect both H's to be grey, but only the one on the left is. The way the cairo backend handles setting the fill and stroke colors is sort of a hack, and it looks like it's coming around to bite us here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions