Strange DrawRect behaviour
Mweigand
It seems only the first call of drawrect will be done and all others ignored.
For example
setdrawlayer /W=main Userfront
SetDrawEnv /W=main xcoord=bottom, ycoord=left
for (i=0;i<11;i+=1)
drawrect /W=main (100*i-10),0,(100*i+10),10
endfor
SetDrawEnv /W=main xcoord=bottom, ycoord=left
for (i=0;i<11;i+=1)
drawrect /W=main (100*i-10),0,(100*i+10),10
endfor
will only result in a single rectangle drawn.
This happens in userfront as well as in userback.
Any idea why this is happening and how to circumvent it?
I noticed some similar oddities with drawtext, too....
I thought that maybe i overlooked something and saved the graph macro for the created graph.
In there, all drawrect commands were also present. But for some reason not drawn (even after recreating the graph from the macro)
September 16, 2008 at 05:43 am - Permalink
SetDrawEnv /W=main xcoord=bottom, ycoord=left, save
Otherwise you could put this call inside your loop but that would be wasteful.
HTH,
AG
September 16, 2008 at 03:57 pm - Permalink
I encountered a similar issue because of the fact that the graph/image was embedded into a panel.
Therefore, one has to explicitely specifiy the target subwindow using the SetActiveSubWindow instruction.
Best Regards
January 13, 2011 at 03:49 am - Permalink