Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29271 Discussions

How can I draw a square with the windows coordinates

ssv123
Beginner
601 Views
Hi,
I am having (wx1,wy1)(wx2,wy2)(wx3,wy3)(wx4,wy4)Actually they are the coordinates of the square. I have these statements like
call moveto_w(wx1,wy1,wxy)
status = lineto_w(wx1,wy1)
call moveto_w(wx2,wy2,wxy)
status = lineto_w(wx2,wy2)
call moveto_w(wx3,wy3,wxy)
status = lineto_w(wx3,wy3)
call moveto_w(wx4,wy4,wxy)
status = lineto_w(wx4,wy4)

Now, how do I draw the lines and make a square.
????
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
601 Views
MoveTo+LineTo draw a line together. Further, if MoveTo is absent, LineTo draws a line to the given point from the point where the last LineTo ended.

You're trying to draw four zero-sized lines. If you remove all MoveTo's except the first, and the first LineTo, it should be OK.

Jugoslav
0 Kudos
ssv123
Beginner
601 Views
Hi Jugo,
Thankyou, Now I am able to draw the lines.
ssv
0 Kudos
Reply