Skip navigation
Currently Being Moderated

[AICS4] Selecting art and making mask does not work together.

Apr 4, 2012 12:38 AM

Hi All,

 

I want to make a clipping mask of some particular arts but problem occurs when I select these arts using sAIArt->SetArtUserAttr(), then make mask usnig action manager.

When I made a selection of the arts i wanted to clip through code and clipped them manually, it worked.

Also when  I made a selection of the arts I wanted to clip manually and clipped them through code, it worked.

But when I do both the tasks through code I does not work.

 

I think the document is not being updated when making clipping mask code is being executed.

 

When I used sAILayer->SelectArtOnLayer it worked but then every art on that layer is clipped, which is not what I want.

 

What can I do in this scenario?

 

Code snippet

////Start

 

AILayerHandle lh = NULL;

sAILayer->GetFirstLayer(&lh);

 

AIArtSet set =NULL;

sAIArtSet->NewArtSet(&set);

sAIArtSet->LayerArtSet(lh, set);

 

// Select first art

AIArtHandle mArt = NULL;

sAIArtSet->IndexArtSet(set, 1, &mArt);

sAIArt->SetArtUserAttr(mArt, kArtSelected, kArtSelected);

 

// Select third art

sAIArtSet->IndexArtSet(set, 3, &art);

sAIArt->SetArtUserAttr(art, kArtSelected, kArtSelected);

 

// Make clipping mask

sAIActionManager->PlayActionEvent(kAIMakeMaskFromSelectionAction, kDialogOff ,NULL);

 

////End

 

Please help.

 

Thanks.

 
Replies
  • Currently Being Moderated
    Apr 4, 2012 4:05 AM   in reply to INeedSol

    There's some functions in the AIGroupSuite that I think are what you're looking for to make clipping masks. The way you're selecting art should work, but you should probably make sure you deselect everything first.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points