Hi All,
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.
plz suggest!
Thanks.
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...
///Start
ASInt32 cnt = -1;
sAILiveEffect->CountLiveEffects(&cnt);
cnt--;
ofstream myfile;
myfile.open ("C:\\Effects_Name.txt");
for( ; cnt >= 0; --cnt)
{
const char *p = NULL;
AILiveEffectHandle le = NULL;
sAILiveEffect->GetNthLiveEffect(cnt, &le);
sAILiveEffect->GetLiveEffectName(le, &p);
myfile << p<<"\n";
}
myfile.close();
}
///END
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.
//Start
AIErr error;
AIActionParamValueRef actionParam;
//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);
//End
Please guide me.
Finally, I have done this like...
//Start
AILayerHandle lh = NULL;
sAILayer->GetFirstLayer(&lh);
AIArtSet set =NULL;
sAIArtSet->NewArtSet(&set);
sAIArtSet->LayerArtSet(lh, set);
AIArtHandle art = NULL;
sAIArtSet->IndexArtSet(set, 1, &art);
AIEnvelopeOptions op;
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%
///End
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?
Thanks
North America
Europe, Middle East and Africa
Asia Pacific