Adobe.com
Contents Suites Classes Class Index Member Index

AIPath.h

Go to the documentation of this file.
00001 #ifndef __AIPath__
00002 #define __AIPath__
00003 
00004 /*
00005  *        Name: AIPath.h
00006  *      Author:
00007  *        Date:
00008  *     Purpose: Adobe Illustrator Path Object Suite.
00009  *
00010  * ADOBE SYSTEMS INCORPORATED
00011  * Copyright 1986-2016 Adobe Systems Incorporated.
00012  * All rights reserved.
00013  *
00014  * NOTICE:  Adobe permits you to use, modify, and distribute this file
00015  * in accordance with the terms of the Adobe license agreement
00016  * accompanying it. If you have received this file from a source other
00017  * than Adobe, then your use, modification, or distribution of it
00018  * requires the prior written permission of Adobe.
00019  *
00020  */
00021 
00022 
00023 /*******************************************************************************
00024  **
00025  **     Imports
00026  **
00027  **/
00028 
00029 #ifndef __AITypes__
00030 #include "AITypes.h"
00031 #endif
00032 
00033 #ifndef __AIArt__
00034 #include "AIArt.h"
00035 #endif
00036 
00037 #ifndef __AIRealBezier__
00038 #include "AIRealBezier.h"
00039 #endif
00040 
00041 #include "AIHeaderBegin.h"
00045 /*******************************************************************************
00046  **
00047  **     Constants
00048  **
00049  **/
00050 
00051 #define kAIPathSuite                    "AI Path Suite"
00052 #define kAIPathSuiteVersion12   AIAPI_VERSION(12)
00053 #define kAIPathSuiteVersion             kAIPathSuiteVersion12
00054 #define kAIPathVersion                  kAIPathSuiteVersion
00055 
00056 
00058 #define kMaxPathSegments                32000
00059 
00060 #define kMaxTextPathSegments    67
00061 
00062 
00064 enum AIPathSegementSelectionState {
00065         kSegmentNotSelected                     = 0,
00066         kSegmentPointSelected           = 1,
00067         kSegmentInSelected                      = 2,
00068         kSegmentOutSelected                     = 3,
00069         kSegmentInAndOutSelected        = 4
00070 };
00071 
00072 
00075 #define kTooManySegmentsErr                     'SEGM'
00076 
00077 
00078 /*******************************************************************************
00079  **
00080  **     Types
00081  **
00082  **/
00083 
00085 struct AIPathSegment {
00086         AIRealPoint p, in, out;
00087         AIBoolean corner;
00088 };
00089 
00090 
00091 /*******************************************************************************
00092  **
00093  **     Suite
00094  **
00095  **/
00096 
00097 
00127 struct AIPathSuite {
00128 
00134         AIAPI AIErr (*GetPathSegmentCount) ( AIArtHandle path, ai::int16 *count );
00135 
00148         AIAPI AIErr (*SetPathSegmentCount) ( AIArtHandle path, ai::int16 count );
00149 
00157         AIAPI AIErr (*GetPathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count, AIPathSegment segments[] );
00158 
00169         AIAPI AIErr (*SetPathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count, const AIPathSegment segments[] );
00170 
00181         AIAPI AIErr (*InsertPathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count, const AIPathSegment segments[] );
00182 
00189         AIAPI AIErr (*DeletePathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count );
00190 
00196         AIAPI AIErr (*GetPathClosed) ( AIArtHandle path, AIBoolean *closed );
00197 
00205         AIAPI AIErr (*SetPathClosed) ( AIArtHandle path, AIBoolean closed );
00206 
00211         AIAPI AIErr (*GetPathGuide) ( AIArtHandle path, AIBoolean *isGuide );
00212 
00217         AIAPI AIErr (*SetPathGuide) ( AIArtHandle path, AIBoolean isGuide );
00218 
00225         AIAPI AIErr (*GetPathSegmentSelected)( AIArtHandle path, ai::int16 segNumber, ai::int16 *selected );
00226 
00237         AIAPI AIErr (*SetPathSegmentSelected)( AIArtHandle path, ai::int16 segNumber, ai::int16 selected );
00238 
00246         AIAPI AIErr (*ReversePathSegments) ( AIArtHandle path );
00247 
00256         AIAPI AIErr (*ReversePathDirection) ( AIArtHandle path );
00257 
00268         AIAPI AIErr (*GetPathArea) ( AIArtHandle path, AIReal *area );
00269 
00275         AIAPI AIErr (*GetPathLength) ( AIArtHandle path, AIReal *length, AIReal flatness );
00276 
00287         AIAPI AIErr (*GetPathBezier) ( AIArtHandle path, ai::int16 segNumber, AIRealBezier *bezier );
00288 
00295         AIAPI AIErr (*PathHasLength) ( AIArtHandle path, AIBoolean *hasLength );
00296 
00303         AIAPI AIErr (*GetPathIsClip) ( AIArtHandle path, AIBoolean *isClip );
00304 
00309         AIAPI AIErr (*GetPathAllSegmentsSelected) ( AIArtHandle path, AIBoolean *selected );
00310 
00317         AIAPI AIErr (*GetKeySegment) (AIArtHandle* path, ai::int16* segmentNumber);
00318 
00323         AIAPI AIErr (*CancelKeySegment) (void);
00324 
00332         AIAPI AIBoolean (*IsPath9SliceSplitter)(AIArtHandle path);
00333 
00346         AIAPI AIErr (*SetKeySegment)(AIArtHandle path, ai::int16 segmentNumber);
00347 
00348         // Functions to measure path segments or access path positions specified by length fractions.
00349         // The flatness used is adaptive per segment (based on the bounding box of its control points) and is not a parameter.
00350         // That is, a very short segment will be measured at a tighter flatness than a large segment.
00351         // This generally gives a better balance of performance and accuracy than using a single flatness across the entire path.
00352 
00368         AIAPI AIErr (*MeasureSegments)(AIArtHandle path, ai::int16 startSeg, ai::int16 count, AIReal pieceLengths[], AIReal accumulatedLengths[] );
00369 
00382         AIAPI AIErr (*LengthFractionToBezierPos)(AIArtHandle path, AIReal lengthFraction, ai::int16 &segIndex, AIReal &bezierT, const AIReal pieceLengths[], const AIReal accumulatedLengths[] );
00383 
00395         AIAPI AIErr (*BezierPosToLengthFraction)(AIArtHandle path, ai::int16 segIndex, AIReal bezierT, AIReal &lengthFraction, const AIReal pieceLengths[], const AIReal accumulatedLengths[]  );
00396 
00412         AIAPI AIErr (*BezierPosToAnchoredPos)(AIArtHandle path, ai::int16 segIndex, AIReal t, AIReal *segLength, AIReal *segLengthFraction );
00413 
00429         AIAPI AIErr (*PerpendicularsAtBezierT)(AIArtHandle path, ai::int16 segIndex, AIReal t, AIReal leftDistance, AIReal rightDistance,
00430                                                                                    AIRealPoint &pointOnPath, AIRealPoint *leftPoint, AIRealPoint *rightPoint );
00431 
00432 };
00433 
00434 
00435 #include "AIHeaderEnd.h"
00436 
00437 
00438 #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