Adobe.com
Contents Suites Classes Class Index Member Index

AIArtStyle.h

Go to the documentation of this file.
00001 #ifndef __AIArtStyle__
00002 #define __AIArtStyle__
00003 
00004 /*
00005  *        Name: AIArtStyle.h
00006  *     Purpose: Adobe Illustrator Art Style Suite.
00007  *
00008  * ADOBE SYSTEMS INCORPORATED
00009  * Copyright 1986-2016 Adobe Systems Incorporated.
00010  * All rights reserved.
00011  *
00012  * NOTICE:  Adobe permits you to use, modify, and distribute this file 
00013  * in accordance with the terms of the Adobe license agreement 
00014  * accompanying it. If you have received this file from a source other 
00015  * than Adobe, then your use, modification, or distribution of it 
00016  * requires the prior written permission of Adobe.
00017  *
00018  */
00019 
00020 
00021 /*******************************************************************************
00022  **
00023  **     Imports
00024  **
00025  **/
00026 
00027 #ifndef __AIArt__
00028 #include "AIArt.h"
00029 #endif
00030 
00031 #ifndef __AIDict__
00032 #include "AIDictionary.h"
00033 #endif
00034 
00035 #ifndef __AIPathStyle__
00036 #include "AIPathStyle.h"
00037 #endif
00038 
00039 #ifndef __AIPaintStyle__
00040 #include "AIPaintStyle.h"
00041 #endif
00042 
00043 #include "AIHeaderBegin.h"
00044 
00048 /*******************************************************************************
00049  **
00050  **     Constants
00051  **
00052  **/
00053 
00054 #define kAIArtStyleSuite                        "AI Art Style Suite"
00055 #define kAIArtStyleSuiteVersion8        AIAPI_VERSION(8)
00056 
00057 /* Latest version */
00058 #define kAIArtStyleSuiteVersion         kAIArtStyleSuiteVersion8
00059 #define kAIArtStyleVersion                      kAIArtStyleSuiteVersion
00060 
00062 enum AIArtStyleFocusValue {
00064         kAIFocusOnFillStroke,
00066         kAIFocusOnObject,
00067         kAIDummyFocus = 0xFFFFFF
00068 };
00069 
00076 #define kAINamedStyleListChangedNotifier        "AI Named Style List Changed Notifier"
00077 
00084 #define kAIArtStyleFocusChangedNotifier  "AI Art Style Focus Changed Notifier"
00085 
00089 #define kAIArtStyleEditTransparencyNotifier  "AI Edit Transparency Notifier"
00090 
00098 #define kAINewArtBasicAppearancePref                                    "AI New Art Basic Appearance"
00099 
00106 #define kAIContainerOverridesObjectAppearancePref               "AI Container Overrides Object"
00107 
00114 #define kStyleNotInCurrentDocument              'STYD'
00115 
00119 #define kStyleTypeNotCompatible                 'STYP'
00120 
00122 #define kMaxStyleNameLength                             63
00123 
00124 
00125 /*******************************************************************************
00126  **
00127  **     Types
00128  **
00129  **/
00130 
00132 enum AIArtStyleType {
00135         kAIArtStyleSimple = 1,
00139         kAIArtStyleActive
00140 };
00141 
00142 
00146 typedef ai::uint32 AIArtStyleHasAttrs;
00150 enum AIArtStyleHasAttrsBits {
00152         kStyleHasNothing                        = 0,
00154         kStyleHasFill                           = 0x0001,
00156         kStyleHasStroke                         = 0x0002,
00158         kStyleHasPatterns                       = 0x0004,
00160         kStyleHasCustomColors           = 0x0008,
00162         kStyleHasFillGradients                  = 0x0010,
00164         kStyleHasRadialGradientsOnFill  = 0x0020,
00166         kStyleHasTransparency           = 0x0040,
00168         kStyleHasBrushes                        = 0x0080,
00169 
00171         kStyleHasStrokeGradients        = 0x0100,
00173         kStyleHasRadialGradientsOnStroke = 0x0200,
00174 
00180         kStyleHasEffects                        = 0x010000,
00182         kStyleHasScalableEffects        = 0x020000,
00183 
00185         kStyleCheckForAll                       = 0xffffffff
00186 };
00187 
00190 struct AIArtStylePaintData {
00191         AIArtStylePaintData() { InitToUnknown(); }
00192         void InitToUnknown() { InitFillToUnknown(); InitStrokeToUnknown(); }
00193         void InitFillToUnknown();
00194         void InitStrokeToUnknown();
00195         void Copy(const AIArtStylePaintData &src) { CopyFill(src); CopyStroke(src); }
00196         void CopyFill(const AIArtStylePaintData &src);
00197         void CopyStroke(const AIArtStylePaintData &src);
00198 
00201         AIRealPoint     fillRelativeGradientOrigin;
00203         AIReal          fillRelativeGradientLength;
00205         AIReal          fillGradientAspectRatio;
00206 
00209         AIRealPoint     strokeRelativeGradientOrigin;
00211         AIReal          strokeRelativeGradientLength;
00213         AIReal          strokeGradientAspectRatio;
00214 };
00215 
00216 inline void AIArtStylePaintData::InitFillToUnknown()
00217 {
00218         fillRelativeGradientOrigin.h = fillRelativeGradientOrigin.v = kAIRealUnknown;
00219         fillRelativeGradientLength = kAIRealUnknown;
00220         fillGradientAspectRatio = kAIRealUnknown;
00221 }
00222 
00223 inline void AIArtStylePaintData::InitStrokeToUnknown()
00224 {
00225         strokeRelativeGradientOrigin.h = strokeRelativeGradientOrigin.v = kAIRealUnknown;
00226         strokeRelativeGradientLength = kAIRealUnknown;
00227         strokeGradientAspectRatio = kAIRealUnknown;
00228 }
00229 
00230 inline void AIArtStylePaintData::CopyFill(const AIArtStylePaintData &src) 
00231 {
00232         fillRelativeGradientOrigin = src.fillRelativeGradientOrigin;
00233         fillRelativeGradientLength = src.fillRelativeGradientLength;
00234         fillGradientAspectRatio = src.fillGradientAspectRatio;
00235 }
00236 
00237 inline void AIArtStylePaintData::CopyStroke(const AIArtStylePaintData &src) 
00238 {
00239         strokeRelativeGradientOrigin = src.strokeRelativeGradientOrigin;
00240         strokeRelativeGradientLength = src.strokeRelativeGradientLength;
00241         strokeGradientAspectRatio = src.strokeGradientAspectRatio;
00242 }
00243 
00244 
00245 
00246 /*******************************************************************************
00247  **
00248  **     Suite
00249  **
00250  **/
00251 
00279 struct AIArtStyleSuite {
00280 
00290         AIAPI AIErr (*GetStyledArt) ( AIArtHandle art, AIArtHandle* styledArt );
00291 
00297         AIAPI AIErr (*GetArtStyle) ( AIArtHandle art, AIArtStyleHandle* artStyle );
00298 
00307         AIAPI AIErr (*GetCurrentArtStyle) ( AIArtStyleHandle* artStyle, AIBoolean* mixedState );
00308 
00318         AIAPI AIErr (*GetArtStyleByName) ( AIArtStyleHandle* artStyle, const ai::UnicodeString& name,
00319                                                                                 AIBoolean searchAllStyles );
00320 
00326         AIAPI AIErr (*CountNamedArtStyles) ( ai::int32* count );
00327 
00334         AIAPI AIErr (*GetNthNamedArtStyle) ( ai::int32 n, AIArtStyleHandle* artStyle );
00335 
00343         AIAPI AIErr (*SetArtStyle) ( AIArtHandle art, AIArtStyleHandle artStyle );
00344 
00351         AIAPI AIErr (*SetCurrentArtStyle) ( AIArtStyleHandle artStyle );
00352 
00360         AIAPI AIBoolean (*IsArtStyleAnonymous) ( AIArtStyleHandle artStyle );
00361 
00368         AIAPI AIErr (*GetArtStyleName) ( AIArtStyleHandle artStyle, ai::UnicodeString& name,
00369                                                                         AIBoolean* isAnonymous );
00370 
00381         AIAPI AIErr (*SetArtStyleName) ( AIArtStyleHandle artStyle, const ai::UnicodeString& name );
00382 
00391         AIAPI AIErr (*GetPaintAttributes) ( AIArtStyleHandle artStyle, AIPathStyle* aiPathStyle,
00392                                                                                 AIArtStylePaintData* paintData );
00393 
00402         AIAPI AIErr (*NewStyle) ( AIPathStyle* aiPathStyle, AIArtStylePaintData* paintData,
00403                                                           AIDictionaryRef blendDict, AIArtStyleHandle* newStyle );
00404 
00414         AIAPI AIErr (*AddNamedStyle) ( AIArtStyleHandle artStyle, const ai::UnicodeString& name, AIBoolean uniquify,
00415                                                                         AIArtStyleHandle* namedStyle );
00416 
00422         AIAPI AIErr (*RemoveNamedStyle) ( AIArtStyleHandle namedStyle, AIArtStyleHandle* anonStyle );
00423 
00429         AIAPI AIErr (*CreateAnonymousStyle) ( AIArtStyleHandle namedStyle, AIArtStyleHandle* anonStyle );
00430 
00436         AIAPI AIErr (*RedefineNamedStyle) ( AIArtStyleHandle namedStyle, AIArtStyleHandle dstStyle );
00437 
00442         AIAPI AIErr (*MoveNamedStyle) (AIArtStyleHandle namedStyle, ai::int32 index);
00443 
00451         AIAPI AIErr (*GetArtStyleByNameFromDocument) ( AIArtStyleHandle* artStyle, const ai::UnicodeString& name,
00452                                                                                                         AIDocumentHandle document );
00461         AIAPI AIErr (*CountNamedArtStylesFromDocument) ( ai::int32* count, AIDocumentHandle document );
00462 
00471         AIAPI AIErr (*GetNthNamedArtStyleFromDocument) ( ai::int32 n, AIArtStyleHandle* artStyle,
00472                                                                                                          AIDocumentHandle document );
00473 
00480         AIAPI AIErr (*Equiv) ( AIArtStyleHandle artStyle1, AIArtStyleHandle artStyle2,
00481                                                           AIBoolean* result );
00482 
00486         AIAPI AIErr (*SortNamedStyles) ( void );
00487 
00492         AIAPI AIErr (*GetDefaultArtStyle) (AIArtStyleHandle* artStyle);
00493 
00498         AIAPI AIErr (*GetDefaultArtStyleName) ( ai::UnicodeString& name);
00499 
00505         AIAPI AIBoolean (*ValidateArtStyle) ( AIArtStyleHandle artStyle );
00506 
00514         AIAPI AIErr (*FlattenStyle) ( AIArtHandle art );
00515 
00519         AIAPI AIErr (*GetArtStyleType) ( AIArtStyleHandle artStyle, ai::int16* type );
00520 
00527         AIAPI AIBoolean (*CanExecute) ( AIArtStyleHandle artStyle );
00528 
00546         AIAPI AIReal (*GetArtStyleScaleFactor) ( AIArtHandle art );
00547 
00554         AIAPI AIErr (*SetArtStyleScaleFactor) ( AIArtHandle art, AIReal scaleFactor );
00555 
00561         AIAPI AIErr (*ResetArtStyleScaleFactor) ( AIArtHandle art );
00562 
00576         AIAPI AIErr (*TransformObjectArtStyle) ( AIArtHandle art, AIRealMatrix *matrix, AIReal lineScale, ai::int32 flags );
00577 
00586         AIAPI AIArtStyleHasAttrs (*ExamineStyle) ( AIArtStyleHandle artStyle, AIArtStyleHasAttrs checkFor );
00587 
00592         AIAPI AIErr (*GetToolArtStyle) ( AIArtStyleHandle* artStyle );
00593 
00594         // ===================== Introduced in Illustrator 10.0 =========================
00595 
00603         AIAPI AIErr (*GetFlattenedArt) ( AIArtHandle art, AIArtHandle *flattenedArt );
00604 
00611         AIAPI AIBoolean (*HasEffectiveNullStyle) ( AIArtHandle art );
00612 
00620         AIAPI AIErr (*GetPaintMap) ( AIArtStyleHandle artStyle, AIPathStyleMap* aiPathStyleMap );
00621 
00622 };
00623 
00624 
00625 #include "AIHeaderEnd.h"
00626 
00627 
00628 #endif


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2014 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks