You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PrintOperation module has a printOptDrawPage signal which provides its callback with a printContext value. This has a function printContextGetCairoContext which returns a Cairo Context. However the library documentation doesn't have an entry for this Context type. See also Issue #215.
Daniel Wagner responded with the following options for fixing this:
I think one of two patches would be sensible here:
Expose a renderWith-alike that consumes a Cairo. Let the user connect up printContextGetCairoContext with the new renderWith-alike.
Don't expose printContextGetCairoContext at all; replace it with
printContextRender :: PrintContextClass self => self -> Render a -> IO a
and have printContextRender merge the call to printContextGetCairoContext with the renderWith-style cleanup.
I like option (1) for its clean backwards-compatibility story; but I like (2) a lot better from the API-design side of things. Since this module probably hasn't seen much use for the reasons you're describing, I'd lean towards patch (2).
The text was updated successfully, but these errors were encountered:
Raised following this question on StackExchange.
The
PrintOperation
module has aprintOptDrawPage
signal which provides its callback with aprintContext
value. This has a functionprintContextGetCairoContext
which returns a CairoContext
. However the library documentation doesn't have an entry for thisContext
type. See also Issue #215.Daniel Wagner responded with the following options for fixing this:
The text was updated successfully, but these errors were encountered: