• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Freeform drawing with mouse

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 14589
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Freeform drawing with mouse

girig
girig over 11 years ago

Hi,

  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.

procedure(addPt(win points)

 cv = deGetCellView(win)

 size = length(points)

 if(size>1 then

   pt1 = nthelem(size,points)

   pt2 = nthelem(size-1, points)

   dbCreateLine(cv list("text" "drawing") list(pt1 pt2))

  )

)

enterPoints(?prompts list("Enter Points") ?addPointProc "addPt" )

Thanks !
Giri. 
  • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Giri,

    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).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • girig
    girig over 11 years ago
    Thanks Andrew. It was more for advanced gesture recognition, and as you rightly pointed out "strokes" doesn't give access to the co-ordinates. Plus if I remember right, the associated binaries only worked on solaris I guess? Anyways I'll see if there is enough RoI before going ahead with an enhancement request. Thanks, Giri.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    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.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 11 years ago

    Hi Giri,

    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?

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • girig
    girig over 11 years ago

    Andrew, Lawrence, 

     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!

    Giri. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information