RE: Win32Lib: drawRectangle question

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

Brendon,

AFAIK, that's the way it's always been.  I remember bringing it to David 
Cuny's attention way back when but I don't remember what he said about 
it.  I think that's just the way Windows does it...

-- Brian


Brendon Sly wrote:
> Hi All,
> 
> While messing with something last night I found an interesting effect 
> with drawRectangle. If I drew a rectangle (filled or not) then plotted 
> 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 
> are outside it. I've tried this on my home machine (Win98) and work 
> (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 
> 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 = 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) 
>  setPixel(MyWin, 100, 10, Black) 
>  setPixel(MyWin, 100, 100, Black) 
> end procedure
> 
> onPaint[MyWin] = 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