Re: patch for gr_UnixImage.cpp

From: Jean Bréfort <jean.brefort_at_normalesup.org>
Date: Mon Nov 28 2005 - 07:59:52 CET

Le lundi 28 novembre 2005 à 10:00 +1100, Martin Sevior a écrit :
> On Sun, 2005-11-27 at 15:49 +0100, Jean Bréfort wrote:
> > Hi,
> >
> > recent changes to gr_UnixImage.cpp (1.39->1.40) broke charts. Here is a
> > patch which fixes that.
> > I found another problem: changing the height of the chart (or another
> > embedded object) does not change ascent and descent, and descent is
> > calculated with :
> > iDescent = UT_convertToLogicalUnits(pszHeight) - iAscent;
> > so it can become negative... IMHO, both ascent and descent should be
> > changed proportionally when height change.
> > This can be done easily in fp_EmbedRun.cpp. Any comment?
> >
>
> Hi Jean,
> Thanks for the patch. It looks OK. I'll apply it after I resynch
> my tree.
>
> Regarding the EmbedRun problem. Do have a test case that illustrates the
> problem?

try to change the height of a chart, and you'll easily see that there is
a problem. When the new height is lower than the original one, you even
have height < ascent + descent !!!

> As far as I know, all embed runs to date have 0 for their descent.

I wrote a component which has non nul descent (and which should not be
resizable). Btw, the GOComponent stuff is now on cvs. I'll have to
change some details to make it build without gtk. At the moment, three
pointers are used (GdkWindow*, GdkPixbuf* and GnomePrintContext*), but
as they are just passed to the real component, it is possible to use
more abstract ones (may be GOWindow*, GOPixbuf* and GOPrintContext*)
instead.

Cheers,
Jean
Received on Mon Nov 28 08:05:55 2005

This archive was generated by hypermail 2.1.8 : Mon Nov 28 2005 - 08:05:55 CET