Win32Lib: drawRectangle question

new topic     » topic index » view thread      » older message » newer message

Hi All,

While messing with something last night I found an interesting effect=20=

with drawRectangle. If I drew a rectangle (filled or not) then plotted=20=

the corner points, it wouldn't match up.

I've attached the smallest piece of code that will show you what I'm on =

about.

The top-left dark point is on the yellow rectangle but the other three=20=

are outside it. I've tried this on my home machine (Win98) and work=20
(Win2000) and get the same result.
I can deal with using 'drawRectangle(A, B, x1, y1, x2+1, y2+1)' but I'm =

just wondering if that's the way it's supposed to be or have I missed=20=

something in the win32lib docs.

Oh yeah, last thing. I'm using win32lib v0.55.1.

Thanks.


Brendon   :|

--

include Win32Lib.ew
without warning

global constant MyWin =3D create( Window, "MyWin", 0, Default, Default, =

300, 300, 0)
setWindowBackColor( MyWin, White )

procedure MyWin_onPaint ( int x1, int y1, int x2, int y2 )
 setPenColor(MyWin, Yellow)
 drawRectangle(MyWin, True, 10, 10, 100, 100)
 setPixel(MyWin, 10, 10, Black)
 setPixel(MyWin, 10, 100, Black)=20
 setPixel(MyWin, 100, 10, Black)=20
 setPixel(MyWin, 100, 100, Black)=20
end procedure

onPaint[MyWin] =3D routine_id("MyWin_onPaint")

WinMain( MyWin, Normal )

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu