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"
00042 
00046 /*******************************************************************************
00047  **
00048  **     Constants
00049  **
00050  **/
00051 
00052 #define kAIPathSuite                    "AI Path Suite"
00053 #define kAIPathSuiteVersion12   AIAPI_VERSION(12)
00054 #define kAIPathSuiteVersion             kAIPathSuiteVersion12
00055 #define kAIPathVersion                  kAIPathSuiteVersion
00056 
00057 
00059 #define kMaxPathSegments                32000
00060 
00061 #define kMaxTextPathSegments    67
00062 
00063 
00065 enum AIPathSegementSelectionState {
00066         kSegmentNotSelected                     = 0,
00067         kSegmentPointSelected           = 1,
00068         kSegmentInSelected                      = 2,
00069         kSegmentOutSelected                     = 3,
00070         kSegmentInAndOutSelected        = 4
00071 };
00072 
00073 
00076 #define kTooManySegmentsErr                     'SEGM'
00077 
00078 
00079 /*******************************************************************************
00080  **
00081  **     Types
00082  **
00083  **/
00084 
00086 struct AIPathSegment {
00087         AIRealPoint p, in, out;
00088         AIBoolean corner;
00089 };
00090 
00091 
00092 /*******************************************************************************
00093  **
00094  **     Suite
00095  **
00096  **/
00097 
00098 
00128 struct AIPathSuite {
00129 
00135         AIAPI AIErr (*GetPathSegmentCount) ( AIArtHandle path, ai::int16 *count );
00136 
00149         AIAPI AIErr (*SetPathSegmentCount) ( AIArtHandle path, ai::int16 count );
00150 
00158         AIAPI AIErr (*GetPathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count, AIPathSegment segments[] );
00159 
00170         AIAPI AIErr (*SetPathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count, const AIPathSegment segments[] );
00171 
00182         AIAPI AIErr (*InsertPathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count, const AIPathSegment segments[] );
00183 
00190         AIAPI AIErr (*DeletePathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count );
00191 
00197         AIAPI AIErr (*GetPathClosed) ( AIArtHandle path, AIBoolean *closed );
00198 
00206         AIAPI AIErr (*SetPathClosed) ( AIArtHandle path, AIBoolean closed );
00207 
00212         AIAPI AIErr (*GetPathGuide) ( AIArtHandle path, AIBoolean *isGuide );
00213 
00218         AIAPI AIErr (*SetPathGuide) ( AIArtHandle path, AIBoolean isGuide );
00219 
00226         AIAPI AIErr (*GetPathSegmentSelected)( AIArtHandle path, ai::int16 segNumber, ai::int16 *selected );
00227 
00238         AIAPI AIErr (*SetPathSegmentSelected)( AIArtHandle path, ai::int16 segNumber, ai::int16 selected );
00239 
00247         AIAPI AIErr (*ReversePathSegments) ( AIArtHandle path );
00248 
00257         AIAPI AIErr (*ReversePathDirection) ( AIArtHandle path );
00258 
00269         AIAPI AIErr (*GetPathArea) ( AIArtHandle path, AIReal *area );
00270 
00276         AIAPI AIErr (*GetPathLength) ( AIArtHandle path, AIReal *length, AIReal flatness );
00277 
00288         AIAPI AIErr (*GetPathBezier) ( AIArtHandle path, ai::int16 segNumber, AIRealBezier *bezier );
00289 
00296         AIAPI AIErr (*PathHasLength) ( AIArtHandle path, AIBoolean *hasLength );
00297 
00304         AIAPI AIErr (*GetPathIsClip) ( AIArtHandle path, AIBoolean *isClip );
00305 
00310         AIAPI AIErr (*GetPathAllSegmentsSelected) ( AIArtHandle path, AIBoolean *selected );
00311 
00318         AIAPI AIErr (*GetKeySegment) (AIArtHandle* path, ai::int16* segmentNumber);
00319 
00324         AIAPI AIErr (*CancelKeySegment) (void);
00325 
00333         AIAPI AIBoolean (*IsPath9SliceSplitter)(AIArtHandle path);
00334 
00347         AIAPI AIErr (*SetKeySegment)(AIArtHandle path, ai::int16 segmentNumber);
00348 
00349         // Functions to measure path segments or access path positions specified by length fractions.
00350         // The flatness used is adaptive per segment (based on the bounding box of its control points) and is not a parameter.
00351         // That is, a very short segment will be measured at a tighter flatness than a large segment.
00352         // This generally gives a better balance of performance and accuracy than using a single flatness across the entire path.
00353 
00369         AIAPI AIErr (*MeasureSegments)(AIArtHandle path, ai::int16 startSeg, ai::int16 count, AIReal pieceLengths[], AIReal accumulatedLengths[] );
00370 
00383         AIAPI AIErr (*LengthFractionToBezierPos)(AIArtHandle path, AIReal lengthFraction, ai::int16 &segIndex, AIReal &bezierT, const AIReal pieceLengths[], const AIReal accumulatedLengths[] );
00384 
00396         AIAPI AIErr (*BezierPosToLengthFraction)(AIArtHandle path, ai::int16 segIndex, AIReal bezierT, AIReal &lengthFraction, const AIReal pieceLengths[], const AIReal accumulatedLengths[]  );
00397 
00413         AIAPI AIErr (*BezierPosToAnchoredPos)(AIArtHandle path, ai::int16 segIndex, AIReal t, AIReal *segLength, AIReal *segLengthFraction );
00414 
00430         AIAPI AIErr (*PerpendicularsAtBezierT)(AIArtHandle path, ai::int16 segIndex, AIReal t, AIReal leftDistance, AIReal rightDistance,
00431                                                                                    AIRealPoint &pointOnPath, AIRealPoint *leftPoint, AIRealPoint *rightPoint );
00432 
00433 };
00434 
00435 
00436 #include "AIHeaderEnd.h"
00437 
00438 
00439 #endif


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