nanogui: Pen Colors
Subject:
Re: [nanogui] Pen Colors
From:
"Greg Haerr" ####@####.####
Date:
20 Nov 2002 03:22:17 -0000
Message-Id: <0aa201c29042$00f51c20$3aba46a6@xmission.com>
: ChanA = CreatePen(PS_SOLID, 0, rgb(0,255,0));
: SelectObject(PenPlot, ChanA);
: MoveToEx(PenPlot, 0,100, NULL);
: LineTo(PenPlot, 300,120);
Check out the implementation of LineTo in src/mwin/wingdi.c.
I would place a couple of printf's in the function, as well
as in src/engine/devopen.c::GdFindColor(), which can show
you the colors that Microwindows is converting the rgb()
macro into a PIXELVAL value. (You should use RGB(),
not rgb())
This debugging will tell you whether it's a hardware conversion
issue for your particular framebuffer, or a bug in Microwindows
internal code. You are also not checking the return value for SelectObject,
or CreatePen, so there could be other failure modes.
Regards,
Greg