[Haskell-cafe] Text bug in Hieroglyph 1.2
Jeff Heard
jefferson.r.heard at gmail.com
Thu Mar 19 11:00:24 EDT 2009
Danny, I'll fix this today and repost and add a maintainer email
address in the cabal package while I'm at it. Thanks!
2009/3/19 Danny Chan <chan_dhf at yahoo.de>:
> Since I haven't found out how to report bugs for this package, I am posting
> this here.
>
> Changing the color of Text elements in a Hieroglyph image like this:
>
> text {attributes = plain {strokeRGBA = opaque blue}}
>
> does not work correctly. Instead, the color used for the text is the one of
> the previously drawn element. With the little knowledge I have about cairo,
> it seems that the bug is in the renderPrimitive function in Cairo.hs where
> the order of Cairo.setSourceRGBA and Cairo.showText is wrong. Something like
> this seems to work:
>
> renderPrimitive _ s0 (Text str (Point ox oy) state) = do
> applyAttributeDelta s0 state
> Cairo.moveTo ox oy
> let (sr,sg,sb,sa) = colourToTuple . strokeRGBA $ state
> when (outlined state) $
> Cairo.setSourceRGBA sr sg sb sa
> Cairo.showText str
> when (clipped state) $ Cairo.clip
> return state
>
> By the way, for the complete newbie that I am, is there a standard way to
> report bugs for a package from Hackage?
>
> Danny
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
More information about the Haskell-Cafe
mailing list