Copy link to clipboard
Copied
how to implement offset path function in C++ using adobe illustrator SDK? I want to write an offset path function using the illustrator SDK, the working of the function is the same as being used in adobe illustrator itself. click the path, offset path, get the dialog box, enter offset limit, and click ok. can anybody help me in this regard?
Good news: your question has been answered here on this forum a few years ago! Since Adobe changed the forum format, though, it's nearly impossible to find things anymore, so you'll need a bit of luck and patience to find it.
I wrote a plugin that incorporated that info, but I develop using Hot Door's CORE so including my code here probably won't be very helpful.
Essentially, you create an Action message in your code and send that to Illustrator. I hope that helps -- Rick
Copy link to clipboard
Copied
Good news: your question has been answered here on this forum a few years ago! Since Adobe changed the forum format, though, it's nearly impossible to find things anymore, so you'll need a bit of luck and patience to find it.
I wrote a plugin that incorporated that info, but I develop using Hot Door's CORE so including my code here probably won't be very helpful.
Essentially, you create an Action message in your code and send that to Illustrator. I hope that helps -- Rick
Copy link to clipboard
Copied
select path try to use this code:
AIActionParamValueRef vref;
sAIActionManager->AINewActionParamValue(&vref);
AIReal offset_l = 5;
AIReal limit = 4;
const char* type = "Round"; //Round Miter Bevel
sAIActionManager->AIActionSetUnitReal(vref, 1868985204, 592476268, offset_l);
sAIActionManager->AIActionSetReal(vref, 1835627634, limit);
sAIActionManager->AIActionSetEnumerated(vref, 1785623664, type, 0);
sAIActionManager->PlayActionEvent("ai_plugin_offset", dialogStatus, vref);
sAIActionManager->AIDeleteActionParamValue(vref);
you can try to record Action and save aia open and Read to understand ><
Copy link to clipboard
Copied
Hi Rick,
Thanks a lot for your reply, I am new to AI SDK but I am trying hard to learn it. up until now, I was trying to build this offset path function using arthandle and aipath suites, but no luck. your code seems reasonable but still hard for me to build the complete function, I would like to make a request to you that if you can elaborate on this function, I shall be very thankful to you
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Because that is an image (composed of pixels), not vectors (paths and whatnot).