Is it possible to draw freeform curves/shapes in virtuoso?
If not, any tricks that can make use of multiple piecewise "line" shapes tracking mouse movement?
I was able to get a crude piece of code working through enterPoints, but that can only track clicks, so the user has to click in short bursts close enough to get the desired shape. It would be ideal if a mouse-drag can be used to draw piecewise linear points tracking the cursor - amounting to a free-form shape.
cv = deGetCellView(win)
size = length(points)
pt1 = nthelem(size,points)
pt2 = nthelem(size-1, points)
dbCreateLine(cv list("text" "drawing") list(pt1 pt2))
enterPoints(?prompts list("Enter Points") ?addPointProc "addPt" )
I don't believe this is possible (at least not with a public API). The "strokes" interface sort of does this, but it doesn't give you access to all the drawn points. This would need an enhancement request - so you'd have to contact customer support with an explanation as to why you need it (it's a slightly unusual request).
In reply to Andrew Beckett:
In reply to girig:
Strokes still work, and you can create strokes in current versions. The old "sted" executable (which was only supported on Solaris and not Linux) has been retired and was replaced some time back with a new editor "stroke_editor" which runs on all platforms.
So maybe if you use that you won't have to invent your own?
The strokes interface does allow you to access the first and last points, as well as the bounding box of the stroke for use in your callback after the stroke has been recognized.
That used to be the case, but now you can access the Stroke Editor through the binary stroke_editor. Take a look at Solution Article 11618300.
Hopefully this will help you?
In reply to skillUser:
Thanks a bunch. This is really useful, sorry I had missed the updates towards linux support. I was able to invoke the stroke editor successfully. My original intent was to try and extract co-ordinates along the path of the gesture too (ceases to be a 'gesture' at that point and is more of a freeform shape), but this is definitely a good start and might cater to a good chunk of what I was looking for.
Thanks once again!