![]() |
ai::ArtSet Class ReferenceA stack based wrapper class over AIArtSetSuite and AIArtSetGeneratorSuite. More...
Detailed DescriptionA stack based wrapper class over AIArtSetSuite and AIArtSetGeneratorSuite. Prefer this class over directly accessing the AIArtSetSuite/AIArtSetGeneratorSuite APIs. Usage Examples: Construction: CAUTION: Constructor would throw if artSet was not constructed properly 1. Default Construct, creates an ai::ArtSet object, ready for actions such as insert, remove, and replace ai::ArtSet artSet; 2. Construct an ai::ArtSet object, filled with all the selected art objects ai::ArtSet artSet(true); 3. Construct an ai::ArtSet object, filled with all the objects on a layer ai::ArtSet artSet(layerHandle); 4. Construct an ai::ArtSet object, filled with an existing array of AIArtHandle(s) ai::ArtSet artSet(artHandles, count); 5. Construct an ai::ArtSet object, filled with all the art objects, matched to AIArtSpec AIArtSpec spec = { kAnyArt, kArtFullySelected, kArtFullySelected }; ai::ArtSet artSet(spec); 6. Construct an ai::ArtSet object, filled with all the art objects matching an array of AIArtSpec AIArtSpec specs = { {kRasterArt, kArtSelected, kArtSelected}, {kPlacedArt, kArtSelected, kArtSelected}, }; ai::ArtSet artSet(specs); Query: Wraps all the query APIs from AIArtSetGeneratorSuite, few examples, 1. To create an ArtSet filled with all non-hidden objects on artboard 1 ai::ArtSet artSet auto err = artSet.GenerateForNthArtboard(1, true); for(auto art :artSet) { art } 2. To create an ArtSet filled with all objects on the 0th layer ai::ArtSet artSet auto err = artSet.GenerateForNthLayer(0); for(auto art :artSet) { art } Accessors: 1. C++ 11 range based loop for(auto art : artSet) { access art } 2. reverse iterate for (auto iter = artSet.rbegin(); iter != artSet.rend(); ++iter) { auto art = *iter; } 3. Get AIArtSet to be passed to APIs which need an AIArtSet AIArtSet aiArtSet = artSet.get(); 4. See if the last operation was successful, or the object was successfully constructed if(artSet) { artSet was constructed successfully, proceed with other operations } 5. Need to pass the AIErr AIErr err = artSet.GetLastError(); Mutators: 1. Insert an AIArtHandle artSet.insert(art); 2. Remove an AIArtHandle artSet.erase(art); 3. Replace an AIArtHandle with another artSet.replace(oldArt, newArt); 4. Clear artSet.clear(); Constructor & Destructor Documentation
Default constructor, fill with selected art objects when true is passed. Referenced by ArtSet().
Create ArtSet from art handle array. References AINOEXCEPT, ArtSet(), operator=(), swap(), and ~ArtSet().
Fill all objects from layer.
template<std::size_t N>
Construct with spec array.
Construct with one Spec.
Referenced by ArtSet().
Move constructor. Member Function Documentation
Returns AIArtHandle stored in index. Throws exception if out of bounds.
Range iterator support.
Removes all elements from an ArtSet.
Removes an AIArtHandle from ArtSet if present.
Generates the ArtSet with the art provided. Traverses the art handle provided and fills the ArtSet with all the nested children of the group art. AIArtSetGeneratorSuite::GenerateForArt()
Returns AIArtSet for APIs that need access to AIArtSet.
Returns the AIErr given back in the in last call to fill the ArtSet.
Inserts into ArtSet if not already present.
Returns AIArtHandle stored in index. Returns nullptr if out of bounds.
Reverse iterator support.
Replaces an AIArtHandle with another in the ArtSet.
The documentation for this class was generated from the following files: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
![]() |
|