How to get rotated attributes
For example, the above red line mark ,how to use API to get it
For example, the above red line mark ,how to use API to get it
I had done several tests regarding getting and setting accumulated rotations and summarized my findings in a post on this forum. Unfortunately, since Adobe changed the software for this forum, I've not been able to search for that post and other related discussions. I have some comments in my code, though, that may prove helpful, that I'll share with you.
I found that simply reading tags with the AITagSuite would sometimes cause a crash, so I ended up using dictionary entries instead. I use Hot Door's CORE, which directly supports dictionaries, so my code is a bit simpler than the SDK's.
bool success = tempArt->dictionary()->getStringEntry("BBAccumRotation", rotStr);
// now convert rotStr to a number
The string in a dictionary or tag can contain up to 16 decimal places, but I use 8 because 16 will crash Illustrator's Free Transform tool.
Illustrator's Properties panel doesn't seem to work the same way the Info panel does. I don't have notes on exactly what is different -- I think that info is in my lost forum post.
When getting the rotation of a group, I look at the rotation of the topmost object within the group.
I hope this is helpful.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.