Re: Printing in CVS HEAD.

From: J.M. Maurer <uwog_at_uwog.net>
Date: Mon Oct 09 2006 - 15:13:30 CEST

On Mon, 2006-10-09 at 11:59 +0100, Tomas Frydrych wrote:
>
> >> if (pGraphics->queryProperties(GR_Graphics::DGP_PAPER))
> >> {
> >> // yay, we are printing
> >> }
> >>
> >> ?
> >
> > This is what is used when not using the PangoGraphics code, but does not
> > work with it.
> >
> >>> and some method to get the associated GnomePrintContext.
>
> I have added GR_UnixPangoPrintGraphics::getGnomePrintContext(),
> scale_x() and scale_y() methods -- please note that the printer graphics
> class you get when we are using pango is GR_UnixPangoPrintGraphics, and
> cannot be cast to XAP_UnixGnomePrintGraphics; the plugin should probably
> check the graphics class type it is getting with getClassId(), and cast
> it accordingly.

or you can try to dynamic_cast<>() it.. when the cast 'fails', dynamic
cast always returns NULL.

Marc
Received on Mon Oct 9 15:14:57 2006

This archive was generated by hypermail 2.1.8 : Mon Oct 09 2006 - 15:14:57 CEST