-
1. Re: layers
A. Patterson Oct 21, 2010 7:38 AM (in response to deerowbear)Use AIArtSuite::ReorderArt() on your circle. I think just this:
sArt->ReorderArt(ai_circle, kPlaceAboveAll, 0);
should do it. Failing that, you might need to get the handle to the top layer (you can iterator, take a look at AILayer.h) and then get its first child (AIArtSuite::GetFirstArtOfLayer) and like so:
AIArtHandle layerGroup 0;
sArt->GetFirstArtOfLayer(layerHandle, &layerGroup);
sArt->ReorderArt(ai_circle, kPlaceInsideOnTop, layerGroup);
-
2. Re: layers
deerowbear Oct 21, 2010 8:34 AM (in response to A. Patterson)sAIArt->ReorderArt(ai_circle, kPlaceAboveAll, 0);
I used this after I drew the circle, but the illustrator crashes. I may try investigation:
AIAPI AIErr(* GetFirstLayer )(AILayerHandle *first)
AIAPI AIErr(* SetCurrentLayer )(AILayerHandle layer)
-
3. Re: layers
deerowbear Oct 21, 2010 9:06 AM (in response to deerowbear)Actually your code works, I of course just checked it on a "funky" file... I used this code and it did the same thing it crashed.
AILayerHandle top_layer;
sAILayer->GetNthLayer(0,&top_layer);
sAILayer->SetCurrentLayer(top_layer);
Either way, your code and the above code seem to work except on one file...thank you for the help.
-
4. Re: layers
btemp Oct 21, 2010 9:08 AM (in response to deerowbear)The SetInsertionPoint function in the AIArt suite lets you set the insertion point for new art objects. Setting that to where you want before you start drawing would be another way.


