2013-08-19 10:07 AM
2013-08-19 10:41 AM
2013-08-20 01:28 AM
2013-08-20 03:54 AM
2013-08-20 05:12 AM
2013-08-20 05:39 AM
if symb_mirrored = 1 then MUL2 -1, 1 endif if symb_rotangle <> 0 then ROT2 -symb_rotangle endif pen outlinepen poly2_b 5,3,0,0, -0.3,-0.3,1, 0.3,-0.3,1, 0.3,0.3,1, -0.3,0.3,1, -0.3,-0.3,1 pen innerline line2 -0.3,-0.3,0.3,0.3 pen waa_text_pen text2 -0.135,0.1, "A" text2 0.155,-0.125, "P" if symb_mirrored = 1 then DEL 1 endif if symb_rotangle <> 0 then DEL 1 endifThis won't allow you to rotate it any angle at all where as yours only un-rotates if at 0, 90, 180 or 270.
2013-08-20 05:53 AM
2013-08-20 02:51 PM
2013-08-20 04:36 PM
ila2 wrote:That's nice!
and for the shorter and faster code you can use this (without IF conditions):
MUL2 1 - 2 * symb_mirrored, 1
ROT2 -symb_rotangle * (symb_rotangle <> 0)
...........................
...........................
...........................
...........................
DEL 2
2013-08-20 06:24 PM
sinceV6 wrote:Yes, it is. The value of the bold part is 1 if the statement is true and 0 if is is not true. I don't know that it is documented or not. I don't remember where/when I learned it.ila2 wrote:That's nice!
and for the shorter and faster code you can use this (without IF conditions):
MUL2 1 - 2 * symb_mirrored, 1
ROT2 -symb_rotangle * (symb_rotangle <> 0)
...........................
...........................
...........................
...........................
DEL 2
The bold part is evaluating as a boolean right?, so in this case the parenthesis work as an IF statement? Maybe I have missed that use in the documentation... or is it not documented? Never picked up that syntax before... pretty efficient!