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
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to