J.B.C.Engelen@...1578... schrieb:
Hi Max,
- How can I create a temporary canvas item to display a helper path having a given shape?
For this, you should have a look at the path flash code in function "sp_node_context_flash_path".
Thanks. I had seen this function, but it simply takes an *existing* item and converts it to a temporary path. This is not so difficult since in this case we can extract the existing SPCurve information from the item. So my question should have been more precise: What's the recommended way to create temporary path "from scratch" (i.e., without necessarily an item existing that has the required path information)?
Can I easily construct the required SPCurve directly? Or should I create a BPath first which is converted to a curve (if so, how would I do this)? Or must I create a separate SPItem from the desired path data and pass this on to sp_nodepath_generate_helperpath()? I gues my question boils down to this: Which of these things is lowest in the hierarchy and still has convenient creation functions?
BTW, how is SPCanvasItem related to SPCurve/SPItem etc.? How do I "correctly" create an SPCanvasItem from given path data? In particular, what do I specify as the parent SPCanvasGroup?
- How can I display text using this mechanism?
Don't know if this is easy to do. The temp canvas item machinery only works with SPCanvasItem. Perhaps it is good to create an SPCanvasItem that renders text, because it can be used for many other things.
Yes. My question is how the "... that renders text" part would work.
Wow, lots of questions. Thanks for your (and everyone's) help! Max