I am trying to draw a simple triangle shape on the document stage from within a Command Panel using Javascript.
This seems like it should be simple enough, but I can't find a way to accomplish it using JS.
I have tried using the addNewLine() function to draw three lines and then use the joinPaths() function to link all the paths together. I can do this, however, I then can not fill in the triangle.
I thought I could also create a newRectangle and then move two anchor points to create the triangle. However, could not figure out how to move an anchor point as well.
Does anyone have any advice or know if I can essentially mimic the Pen Tool using JS commands from a command panel?
Thanks,
Mariano










