I have an image on document and I want to wrap it horizontally. But I don't know which suites are required to perform this operation and how.
I went through APIs and searched in this forum and got to know that I'll have to apply "Adobe Deform " effect.
Actly I saw it in this thread http://forums.adobe.com/message/4158636#4158636
Also when I get the all effects name and write them into a file. I got the "Adobe Deform" and 86 more. Here is the code snippet...
ASInt32 cnt = -1;
for( ; cnt >= 0; --cnt)
const char *p = NULL;
AILiveEffectHandle le = NULL;
myfile << p<<"\n";
All I want to know is how to warp a selected image horizontally on a document programmatically.
Also I tried to use Action manager suite to warp the object but code has no effect. Here is the code snippet.
//create a new action param value.
error = sAIActionManager->AINewActionParamValue(&actionParam);
error = sAIActionManager->AIActionSetInteger(actionParam,kAIEnvelopeWarpStyle , kWarpStyleArc);
error = sAIActionManager->AIActionSetInteger(actionParam,kAIEnvelopeBend, 2);
error = sAIActionManager->AIActionSetInteger(actionParam,kAIEnvelopeHorizDist ort, 20);
error = sAIActionManager->AIActionSetInteger(actionParam, kAIEnvelopeVertDistort , 0);
error = sAIActionManager->AIActionSetInteger(actionParam,kAIEnvelopeRotate90, 0);
error = sAIActionManager->PlayActionEvent(kAIEnvelopeMakeAction , kDialogOn, actionParam);
Please guide me.
Finally, I have done this like...
AILayerHandle lh = NULL;
AIArtSet set =NULL;
AIArtHandle art = NULL;
sAIArtSet->IndexArtSet(set, 1, &art);
op.envOptions = kDeformAll;
op.fidelity = 100;
sAIEnv->MakeEnvelope(&art, 0,0, &op, &art);
sAIEnv->WarpEnvelope(art, kWarpStyleArc, .1, 0, 0, false ); // .1 bending for 10%
But one thing I want to know is that how illustrator calculates the radius of upper arc. I see that after setting the bending option to 100% in kWarpStyleArc style:
radius of upper arc = (length/2 + height) of input object.
And radius of lower arc in any case :
radius of lower arc = radius of upper arc - height.
Can anyone suggest me how its calculating the radius of upper arc for a given bending % value?
Europe, Middle East and Africa