[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

RE: [XaraXtreme-dev] GDraw bitmap width limit



The CDraw source actually says this:

	if ( Width>MAX_BITMAP_WIDTH )
		THROW(ERROR_BAD_BITMAP) ;

...so presumably we are just compiling it with the "wrong" value for
MAX_BITMAP_WIDTH.  This value is set to (MAXBITMAPWIDTH * 1024) and if
this is unset then it defaults to 4K.  All we should have to do is to
define MAXBITMAPWIDTH to 16 when building CDraw and we should have the
same limits as in Xtreme.

Gerry

-----Original Message-----
From: owner-dev@xxxxxxxxxxxxxxxx [mailto:owner-dev@xxxxxxxxxxxxxxxx] On
Behalf Of Charles Moir
Sent: 26 June 2006 18:19
To: dev@xxxxxxxxxxxxxx
Subject: RE: [XaraXtreme-dev] GDraw bitmap width limit

Er, well this was fixed about a year ago in GDraw (before we released
Xara Xtreme), so I don't understand why there's such a check in CDraw
still.

Gavin?

Charles


> -----Original Message-----
> From: owner-dev@xxxxxxxxxxxxxxxx 
> [mailto:owner-dev@xxxxxxxxxxxxxxxx] On Behalf Of Alex Bligh
> Sent: 26 June 2006 18:16
> To: dev@xxxxxxxxxxxxxx
> Cc: Alex Bligh
> Subject: Re: [XaraXtreme-dev] GDraw bitmap width limit
> 
> Charles Moir wrote:
> > You can export bitmaps to at least 10,000 pixels (and I 
> have a feeling 
> > 15,000 pixels) in the latest Xtreme, so I don't know why there is a 
> > much lower limit in printing.
> > 
> > I think Gavin changed GDraw some time back to allow this, 
> so the old 
> > printing code probably assumes older GDraw limits.
> 
> Well the current GDraw_SetUpBitmap checks on entry that the 
> bitmap is not wider than 4096 bytes. It's as simple as that.
> It's not in the printing code, it's in CDraw, in SetDIBitmap 
> line 96 of GDraw.cpp (obvious both from the source, and from 
> a disassembly as that's how I found it, about 10 instructions in).
> 
> If Gavin's fixed it already, great - can we have the fix in 
> the net version please?
> 
> Alex
>