Hot Door CORE Forum

Full Version: artworkPointToViewPoint glitch?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If I generate two ArtboardPoints 14400 px apart and draw a line between them with hdi::core::draw::line, the line falls where I'd expect it to.

Next I convert the ArtboardPoints to Points using the code below:

Code:
// hdi::core::ArtboardPoint ABpt defined elsewhere
hdi::core::CurrentDocument* currDoc = HDI_CORE_ILLUSTRATOR->currentDocument();
hdi::core::Point Pt = currDoc->currentView()->artworkPointToViewPoint(ABpt);

When I store the two points and draw a line between them in my annotation callback, it works correctly at zoom levels under 400%. Any time I'm zoomed in 400% or more, the line goes through the screen area, but the two points are far from the correct locations.

If, however, I space the points 14400 divided by my current zoom level, the line is drawn correctly. Is this a bug in calculating the artworkPointToViewPoint when the values are too large? Or perhaps it's a known limitation I should have been aware of.

Thanks!
-- Rick
Hmm, this is an interesting issue, and I strongly suspect it lies within the Illustrator SDK itself. Our method to convert an artwork point to a document view point is a very thin wrapper around the appropriate SDK call; we essentially just call it directly without any mentionable overhead. If this is a major bug for you, I think it would be worth it to test in other versions of Illustrator, and via the SDK alone (i.e. take one of Adobe's official sample plugins and reproduce the problem there, if possible). Then you can submit a bug for it to Adobe themselves on their forums.