Re: drawLine( ) fails?

new topic     » goto parent     » topic index » view thread      » older message » newer message
lpuster said...

I can not get drawLine() or drawLines() to put anything into the window. I am using the latest version of win32Lib. What am I doing wrong?

Here's the source of win32lib/demo/drawRecTest.exw. It will give you an idea of what you need to be doing.

include win32lib.ew 
without warning 
 
createForm("Test drawRectangle, size=(150,150)") 
 
global procedure Paint_TestdrawRectangle(integer self, integer event, sequence params) 
    -- Draw the background 
    setPenColor(self, Yellow) 
    drawRectangle(self, w32True, 10, 10, 100, 100) 
 
    -- Draw the outside edge 
    setPenColor(self, BrightRed) 
    setPenWidth(self,2) 
    drawRectangle(self, w32False, 10, 10, 100, 100) 
 
    -- Draw the inner square 
    setPenColor(self, BrightBlue) 
    setPenWidth(self,3) 
    drawRectangle(self, w32False, 24, 24, 86, 86) 
 
end procedure 
registerRoutine("Paint_TestdrawRectangle", routine_id("Paint_TestdrawRectangle")) 
 
include w32Start.ew 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu