Hot Door CORE Forum
direct access to ArtboardSegPoint? - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: General discussion (http://hotdoorcore.com/forum/forumdisplay.php?fid=3)
+--- Thread: direct access to ArtboardSegPoint? (/showthread.php?tid=78)



direct access to ArtboardSegPoint? - Rick Johnson - 06-18-2016

Am I overlooking something simple, to directly access the in/out/anchor points of an ArtboardSegPoint? It seems a bit cumbersome to extract it into a vector, adjust it there, then setSegPoints again. If not, then perhaps this could be a feature request in a future CORE release. Thanks -- rj


RE: direct access to ArtboardSegPoint? - garrett - 06-22-2016

(06-18-2016, 08:34 PM)Rick Johnson Wrote: Am I overlooking something simple, to directly access the in/out/anchor points of an ArtboardSegPoint?

The members "p", "in", and "out" of the ArtboardSegPoint are public, so you can access them directly.

(06-18-2016, 08:34 PM)Rick Johnson Wrote: It seems a bit cumbersome to extract it into a vector, adjust it there, then setSegPoints again.

If you're referring to the PathArt class, then no, there is no alternative. The underlying Illustrator SDK does not directly expose the memory for the segment points either, so at that level we must also acquire the segment points for manipulation and later set their values with a function.

At least with C++ we can utilize vectors for this procedure, rather than the Illustrator SDK which operates on C-style arrays (so no manual allocation of memory for your segment point array, and manual freeing of said memory, is necessary).


RE: direct access to ArtboardSegPoint? - Rick Johnson - 06-22-2016

Thanks, Garrett. I must agree, using vectors rather than arrays is a major plus. It's interesting that Adobe's implementation of both AppleScript and Javascript allow direct access to "path points" as elements of a path, almost as though the path itself were already a vector.