Win32Lib drawPolygon routine
------=_NextPart_000_0011_01BEDB58.4314E380
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Can somebody explain how this routine works? It doesn't do what I would =
expect it to do...
Here is an example of what I would expect to draw a house-shaped polygon =
but it's not even close.
What am I doing wrong?
include win32lib.ew
without warning
constant TestWin =3D =20
create( Window, "Polygon Test", 0, Default, Default, 640, 480, 0 )
----------------------------------------
procedure onPaint_TestWin( integer x1, integer y1, integer x2, integer =
y2 )
setPenColor( TestWin, Black )
drawPolygon( TestWin, 1, { {100,100}, {100,200} , {200,200}, =
{200,100}, {150,50}, {100,100 } } )=20
end procedure
onPaint[TestWin] =3D routine_id("onPaint_TestWin")
----------------------------------------
-- pass control to Windows
WinMain( TestWin )
------=_NextPart_000_0011_01BEDB58.4314E380
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3401" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Can somebody explain how this routine works? =
It doesn't=20
do what I would expect it to do...</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>Here is an example of what I would expect to draw a=20
house-shaped polygon but it's not even close.</FONT></DIV>
<DIV><FONT size=3D2>What am I doing wrong?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>include win32lib.ew<BR>without warning</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>constant TestWin =3D <BR> =
create(=20
Window, "Polygon Test", 0, Default, Default, 640, 480, 0 )</FONT></DIV>
<DIV> </DIV>
<DIV><FONT =
onPaint_TestWin( integer x1, integer y1, integer x2, integer y2 =
)<BR> =20
setPenColor( TestWin, Black )<BR> drawPolygon( TestWin, 1, { =
{100,100},=20
{100,200} , {200,200}, {200,100}, {150,50}, {100,100 } } ) <BR>end=20
procedure<BR>onPaint[TestWin] =3D =
routine_id("onPaint_TestWin")</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=3D2>----------------------------------------<BR>-- pass =
control to=20
------=_NextPart_000_0011_01BEDB58.4314E380--
|
Not Categorized, Please Help
|
|