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

RE: [XaraXtreme-dev] GDraw bitmap width limit



As Gerry stated, it's just a matter of changing MAXBITMAPSIZE, otherwise
CDraw defaults to a maximum bitmap size of 4K*4K.

I don't know what the size is for Xtreme but I think it is 16K. Earlier
versions of XaraX were shipped with two versions of GDraw: a 4K and a
16K version. I think Xtreme just has the 16K version.

I try to consistently use unsigned bitmap offsets in CDraw, but whether
or not I am truly consistent I don't know. CDraw was written to use
unsigned values when unsigned is what is required.

Gavin

-----Original Message-----
From: owner-dev@xxxxxxxxxxxxxxxx [mailto:owner-dev@xxxxxxxxxxxxxxxx] On
Behalf Of Alex Bligh
Sent: 27 June 2006 10:23
To: dev@xxxxxxxxxxxxxx
Cc: Alex Bligh
Subject: RE: [XaraXtreme-dev] GDraw bitmap width limit

Gavin,

> Alex, did you fix this, or do I need to make some changes to CDraw?

I didn't fix it, but if it is a matter of just changing the
MAXBITMAPSIZE
define, I can fix it.

> This comes down to an accuracy problem. CDraw uses fixed point maths
for
> polygon rendering with coordinates stored in a 32 bit value. This
> doesn't give enough accuracy with large bitmaps. (I've just seen the
> same problem in Ghostscript: using very large bitmaps causes long
lines
> to end a few pixels out from where they should). It may be that I need
> to store coordinates using doubles instead of fixed point, but
obviously
> this will require a fair amount of rewriting of code, but this would
> allow a higher limit.
>
> Also the fixed maximum size of tables allows me to write faster code.
I
> don't need to keep pointers to tables such as scanline buffers and
> scanline indexes. Instead I can just index off of the "this" pointer
> hence requiring less registers (a major issue with GDraw). This will
be
> less of an issue with the Intel's new 64 bit processors with their 16
> general registers.

Right now I am only seeking to make it work the way Xtreme works, which
(according to Gerry) supports 16,384 pixel width bitmaps.

I appreciate there are tradeoffs (at least whilst we continue to use 32
bit coordinates) in terms of the size and code, and though I was hoping
to get to 32768, 16384 will do for the time being.

What I need is just confirmation that when CDraw/GDraw compiles on
Xtreme, MAXBITMAPSIZE is defined to be 16 (to give a 16k width). If
that's
the case, I will make it work like that on LX too.

For my own interest, is the internal bitmap size limited to 2GB or 4GB
(i.e. do you ever treat offsets into the bitmap as signed)?

Alex