Re: drawing lines

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

>Can someone give me a hint why this does not show a line?
>setPenColor(mainWindow,Blue)
>setPenStyle(mainWindow,Solid)
>drawLine(mainWindow,10,100,300,300) 
>thanks.
>George Walters

Try this....

without warning
include Win32Lib.ew
constant rectX = 600, rectY = 400
constant win = create(Window, "Draw Line", 0, 0, 0, rectX, rectY, 0)
constant canvas = create(Pixmap, "", win, 0, 0, rectX, rectY, 0)
---===---===---===---===---===---===---===---/   procedures (START)
procedure onStart()
 setPenColor(canvas, Black)
 drawRectangle(canvas, True, 0, 0, rectX, rectY )
 setPenColor(canvas, Blue )
 setPenStyle(canvas, Solid )
    drawLine(canvas, 10, 100, 300, 300 )
end procedure
    onOpen[win]=routine_id( "onStart" )

procedure Paint(integer x1, integer y1, integer x2, integer y2)
 copyBlt(win, 0, 0, canvas)
end procedure
    onPaint[win]=routine_id("Paint")
---===---===---===---===---===---===---===---/   procedures (END)
WinMain(win, Normal )

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

Search



Quick Links

User menu

Not signed in.

Misc Menu