Wow, this is a lot of questions, and this thread is getting too large. I will try to answer all of them for you here, but in the future can you start a new thread for each individual issue you're having? That will make it easier to keep track of things. Thanks.
Your question/concern about tool tracking and/or hit tests wasn't very clear. Are you having trouble receiving tool messages, or just performing hit tests?
CORE does not use Illustrator's AIHitTestSuite at all. We have a custom implementation of hit testing in the hdi::core::HitData class that allows for hit tests to occur off-screen, which AIHitTestSuite does not allow. We also wanted to simplify some of the over-complications and annoyances of Illustrator's hit testing. If you prefer Illustrator's hit tests over CORE's, then simply use AIHitTestSuite as you normally would.
CORE currently does nothing with AIArtSetSuite, as we have not needed it in any of our own plugins. I am also somewhat unfamiliar with that suite because we haven't needed it. There should be no reason for CORE to interfere with the operation of the suite, unless AIArtSetSuite-related messages are being improperly handled by CORE's event dispatcher. I will have to discuss this situation further with Brendon.
The vast majority of modern graphics programming environments utilize an inverted first quadrant of the Cartesian plane, so in CORE we made the choice to "flip" all of Illustrator's coordinates to match. This is to say that in most environments, x-axis values increase as you go left-to-right, and y-axis values increase as you go top-to-bottom. For some reason, Adobe made the decision to utilize a true first quadrant, as their y-axis increases going bottom-to-top. If you need to convert a hdi::core::ArtboardPoint for use with an Illustrator suite, then simply flip the sign of the y-axis value. If you do this a lot, then a macro would probably be a big help.
Here is a quick example for an annotator in the Skeleton sample:
With regards to your crash, it's really hard to say without seeing some sample code that exhibits the problem. However, it seems to be event dispatching-related, so an object you were pointing to in a callback might have been deleted (so a crash occurred when its member function was dereferenced). Otherwise, you might have modified a member of the hdi::core:ispatcher class somehow, and during message data cleanup it dereferenced a bad pointer. I would start looking for these types of situations, and provide us with some sample code that exhibits the issue if possible. Of course, the problem might go away when you switch to AIHitTestSuite.
EDIT: We can probably get version 0.5.1 of CORE out this week, but it might have to wait for next week.
Thanks for the feedback.
Your question/concern about tool tracking and/or hit tests wasn't very clear. Are you having trouble receiving tool messages, or just performing hit tests?
CORE does not use Illustrator's AIHitTestSuite at all. We have a custom implementation of hit testing in the hdi::core::HitData class that allows for hit tests to occur off-screen, which AIHitTestSuite does not allow. We also wanted to simplify some of the over-complications and annoyances of Illustrator's hit testing. If you prefer Illustrator's hit tests over CORE's, then simply use AIHitTestSuite as you normally would.
CORE currently does nothing with AIArtSetSuite, as we have not needed it in any of our own plugins. I am also somewhat unfamiliar with that suite because we haven't needed it. There should be no reason for CORE to interfere with the operation of the suite, unless AIArtSetSuite-related messages are being improperly handled by CORE's event dispatcher. I will have to discuss this situation further with Brendon.
The vast majority of modern graphics programming environments utilize an inverted first quadrant of the Cartesian plane, so in CORE we made the choice to "flip" all of Illustrator's coordinates to match. This is to say that in most environments, x-axis values increase as you go left-to-right, and y-axis values increase as you go top-to-bottom. For some reason, Adobe made the decision to utilize a true first quadrant, as their y-axis increases going bottom-to-top. If you need to convert a hdi::core::ArtboardPoint for use with an Illustrator suite, then simply flip the sign of the y-axis value. If you do this a lot, then a macro would probably be a big help.
Here is a quick example for an annotator in the Skeleton sample:
Code:
void skel::Plugin::startup()
{
this->__corePlug->dispatcher()->registerAnnotator(
hdi::core::Annotator(
"MY_SAMPLE_ANNOTATOR_ID",
HDI_CORE_CALLBACK(skel::Plugin, this, __annotate)
)
);
}
void skel::Plugin::__annotate()
{
hdi::core::annotate::line(
hdi::core::Point(10.0, 10.0),
hdi::core::Point(20.0, 20.0)
);
}
With regards to your crash, it's really hard to say without seeing some sample code that exhibits the problem. However, it seems to be event dispatching-related, so an object you were pointing to in a callback might have been deleted (so a crash occurred when its member function was dereferenced). Otherwise, you might have modified a member of the hdi::core:ispatcher class somehow, and during message data cleanup it dereferenced a bad pointer. I would start looking for these types of situations, and provide us with some sample code that exhibits the issue if possible. Of course, the problem might go away when you switch to AIHitTestSuite.
EDIT: We can probably get version 0.5.1 of CORE out this week, but it might have to wait for next week.
Thanks for the feedback.