nanogui: Thread: Possible cause of portrait mode stray line bug


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Possible cause of portrait mode stray line bug
From: "Greg Haerr" ####@####.####
Date: 15 Dec 1999 03:17:39 -0000
Message-Id: <000701bf4699$4d03d2a0$15320cd0@gregh>

Martin,
    I tried what you asked and destroyed the second window
above the 3d window and, yes, the glitch line disappears. I then
however removed all client draw code from the other windows,
and the glitch is still there...

I think the problem is in a much more devious place.  I looked
at the modification to SelectObject, where you reverse the xres
and yres if psd->flags&PSF_PORTRAIT is set.  This causes
the draw code to use the bitmap y/x reversed.  HOWEVER,
when creating the bitmap using CreateBitmap further on down
in wingdi.c, you'll see that we determine the amount of memory
based on some calculations of width and height that are NOT
reversed.  I think the bug is that the bitmap memory isn't the
right size, after y/x are reversed.  A simple solution might
be to try reversing width and height in that procedure,
but I didn't try that yet....  What do you think?

Regards,

Greg

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.