Macromedia Illustrator - CS6 Porting Guide

ADOBE® ILLUSTRATOR® CS6
ADOBE ILLUSTRATOR CS6
PORTING GUIDE
revision 2
© 2012 Adobe Systems Incorporated. All rights reserved.
Adobe Illustrator CS6 Porting Guide (revision 2)
Technical Note #10500
If this guide is distributed with software that includes an end user agreement, this guide, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content in this guide is protected under copyright law even if it is not distributed with software that includes an end user license agreement.
The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this guide.
Please remember that existing artwork or images that you may want to include in your project may be protected under copyright law. The unauthorized incorporation of such material into your new work could be a violation of the rights of the copyright owner. Please be sure to obtain any permission required from the copyright owner.
Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual organization.
Adobe, the Adobe logo, and Illustrator are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Apple, Mac OS, and Macintosh are trademarks of Apple Computer, Incorporated, registered in the United States and other countries. All other trademarks are the property of their respective owners.
Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA. Notice to U.S. Government End Users. The Software and Documentation are “Commercial Items,” as that term is defined at 48 C.F.R. §2.101, consisting of “Commercial Computer Software” and “Commercial Computer Software Documentation,” as such terms are used in 48 C.F.R. §12.212 or 48 C.F.R. §227.7202, as applicable. Consistent with 48 C.F.R. §12.212 or 48 C.F.R. §§227.7202-1 through
227.7202-4, as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to U.S. Government end users (a) only as Commercial Items and (b) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Unpublished-rights reserved under the copyright laws of the United States. Adobe Systems Incorporated, 345 Park Avenue, San Jose, CA 95110-2704, USA. For U.S. Government End Users, Adobe agrees to comply with all applicable equal opportunity laws including, if appropriate, the provisions of Executive Order 11246, as amended, Section 402 of the Vietnam Era Veterans Readjustment Assistance Act of 1974 (38 USC 4212), and Section 503 of the Rehabilitation Act of 1973, as amended, and the regulations at 41 CFR Parts 60-1 through 60-60, 60-250, and 60-741. The affirmative action clause and regulations contained in the preceding sentence shall be incorporated by reference.

Contents

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
New features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Illustrator API changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Illustrator SDK changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
SDK organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Changes in this release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Development environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ADM removed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Data types updated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Memory allocation automatic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Sample plug-ins recompiled and reworked . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
API changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Outdated plug-in samples removed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Samples updated for new types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Samples updated to use new techniques and suites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Porting existing plug-ins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3

Adobe Illustrator CS6 Porting Guide

This document describes how to update your SDK plug-in code and development environments for Adobe® Illustrator® CS6. It details changes in the public API and other aspects of the SDK since the previous release.

Introduction

Download the Illustrator CS6 SDK from http://www.adobe.com/devnet/illustrator/, along with installation instructions and documentation.
Creative Suite 6 requires a different development environment from previous releases; this means that you must recompile plug-ins built with an earlier version of the Illustrator SDK in order for them to run in Illustrator CS6. See

SDK organization

The SDK contains these folders and files (locations are relative to the download location, <SDK>):
Development environment” on page 5.
docs/
Documentation, including:
Adobe Illustrator CS6 Programmer’s Guide
(
guides/programmers-guide.pdf)
Porting Guide (this document)
Getting Started with Illustrator CS6 Development
(
guides/getting-started-guide.pdf)
Using the Adobe Text Engine
(
guides/using-adobe-text-engine.pdf)
API Reference
This document is provided in two formats:
references/index.chm — This compiled HTML file allows text
searches to be performed on the content. See the Getting Started with Illustrator CS6 Development for details.
references/sdkdocs.tar.gz — This file contains the API
Reference in HTML format. To view the contents, decompress the
archive, then open
API Advisor (references/apiadvisor-ai15-vs-ai16.html)
index.html in your browser.
legalnotices/
illustratorapi
Licenses.
The Illustrator API header files.
4
Adobe Illustrator CS6 Porting Guide Introduction 5
samplecode/

Changes in this release

These are the major changes between this release and the previous release.
Development environment
The development environment has changed for both platforms, and plug-ins must be recompiled to run in this release. New project templates are included in the SDK.
This release supports these platforms for Illustrator plug-in development.
Platform Component Note
Windows Windows XP Service Pack 3 or higher
Illustrator CS6
Visual Studio 2010 SP1
Visual Studio 2010 has replaced the
_ITERATOR_DEBUG_LEVEL macro. Illustrator defines _ITERATOR_DEBUG_LEVEL=0 for Release, and _ITERATOR_DEBUG_LEVEL=2 for Debug. We recommend that developers do the same.
A set of samples for learning about the API. See “Illustrator SDK changes”
on page 8.
_SECURE_SCL and _HAS_ITERATOR_DEBUGGING flags with an
Mac OS® Mac OS 10.6.4 or higher
Apple 10.6 SDK You must remove any API functions that are not
supported by this version.
Xcode 3.2.5 Xcode can be downloaded from
http://developer.apple.com/tools/download/
Illustrator no longer supports Mac OS 10.4, 10.5, or PPC processors.
ADM removed
Adobe Dialog Manager (ADM), the UI framework that was used for the Illustrator UI before CS5, was previously deprecated and is no longer supported. The ADM header files and sample plug-in have been removed from the SDK.
If you have any existing plug-ins that use ADM, they will have compilation errors. Although you can compile such a plug-in by explicitly including the header files from the previous release, the ADM functionality is not available, and the plug-in will not run in the current release.
In order for your UI to work with this release, you must remove any usage of ADM from your plug-in and replace it with another UI framework of your choice. You can use any 3rd-party or platform-specific UI framework, or one of the UI frameworks provided by Adobe, such as Flash®/Flex®-based controls. Adobe can provide support only for Adobe products.
Adobe Illustrator CS6 Porting Guide New features 6
Note that in Mac OS, ADM used the older Carbon framework, while the UI now uses the newer Cocoa framework. For more information about how to make this transition, see:
https://developer.apple.com/technologies/mac/cocoa.html
Data types updated
Throughout the SDK, data types have been updated to be more specific and to support both 32-bit and 64-bit architecture. For example:
long ai:int32 short ai:int16 unsigned short ai:uint16 ASInt32 ai:int32 int ai:int16, ai:int32
Count and buffer size values are now reported using the size_t data type.
Memory allocation automatic
Memory allocation in this release is completely compatible with platform usage. Developers are no longer required to explicitly allocate and release memory.
Sample plug-ins recompiled and reworked
All of the samples in this release have been updated to reflect the new data types that are now in use throughout the API, and the interfaces have been reworked to remove the use of ADM. All samples have been compiled in the currently supported development environments.
If you have any projects from the previous release, you must similarly convert them to use them with this release. See

New features

This section describes new features that have been added to Adobe Illustrator CS6, and their support in the SDK.
Pattern creation
This release updates and simplifies pattern creation. The SDK samples have been updated to use the new API and creation techniques.
Live Trace enhancements
Tracing functionality has been updated to use vectorization, and the replaced by the LiveColor) in the SnippetRunner SDK sample demonstrate the use of the new suite and techniques.
Porting existing plug-ins” on page 9.
AITracingSuite has been
AIVectorizationSuite. New versions of the tracing snippets (LiveTrace and
Gradients on strokes
The ability to apply gradients to strokes is demonstrated by a new snippet (SnpGradient) in the SnippetRunner SDK sample.
Adobe Illustrator CS6 Porting Guide Illustrator API changes 7

Illustrator API changes

This section summarizes the important changes to the API since the prior release. A detailed change list is provided with the SDK, in the API Advisor page,

API changes

The obsolete ADM classes and header files have been removed.
Legacy header files for versions earlier than CS5 (AI 15) have been removed.
Access to AGM ports, which was previously available through ADM, is now available through the
AIDrawArtSuite. An example of usage is provided by the new DrawArt SDK sample.
These header files and classes are no longer included:
AICropArea.h AICropAreaRange.h AIDataStack.h AITracing.h AIUIUtils.h ASLib.h ASMemory.cpp IAIUnicodeStringUtils IAIUserInput
( replaced by AIVectorizeSuite)
apiadvisor-ai15-vs-ai16.html.
AIToolIconDict
has been removed and replaced by types added to AIAddToolDataSuite. See
examples in SDK samples Annotator, MarkedObjects, and Tutorial.
Many functions have changed parameter types to accommodate the removal of ADM and type
changes such as
New functions have been added in existing suites (see details in API Advisor page):
AIAnnotatorDrawerSuite AIAppContextSuite AIArtSuite AIBeautifulStrokesSuite AICharacterEncodingSuite AICommandManagerSuite AIDictionarySuite AIDocumentViewSuite AIDrawArtSuite AIFontSuite AIIsolationModeSuite AIMeshSuite AIOverrideColorConversionSuite AIPatternSuite AIPreferencesSuite AIUserSuite ATE::CharFeaturesSuite, ATE::AICharInspectorSuite ATE::ParaFeaturesSuite, ATE::ParaInspectorSuite SPFilesSuite
long to ai::int32 or size_t. See details in the API Advisor page.
Adobe Illustrator CS6 Porting Guide Illustrator SDK changes 8
New suites have been added to support new features and functionality:
AIControlBarSuite AICSXSExtensionSuite AIPanelSuite AIPanelFlyoutMenuSuite AIUIThemeSuite AIVectorizeSuite ATE::ArrayKashidaWidthSuite
New classes include:
IAIPointImpl IAIRectImpl ATE::IArrayKashidaWidth
New files include:
AIBasicUtilities.h AIControlBar.h AICSXS.h, AICSXSExtension.h AIModalParent
AIPanel.h AIScriptMessage.h AITransformTypes.h AIUITheme.h AIVectorize.h
AIWinDef.h
IAIPoint.h
IAIRect.h
(replaces AITracingSuite)

Illustrator SDK changes

This section summarizes changes to the organization and content of the SDK since the prior release.

Outdated plug-in samples removed

The Shell plug-in framework and Adobe Dialog Manager are no longer supported, and the corresponding samples,

Samples updated for new types

All samples have been updated to use the new data types and to remove ADM interfaces.

Samples updated to use new techniques and suites

The new ScriptMessage sample demonstrates the use of the new AIScriptMessage structure.
The MarkedObjects and ScriptMessage samples demonstrate the new control of application theme
The MultiArrowTool sample demonstrates how to make a tool icon that works with both light and dark
Shell and ADMNonModalDialog, have been removed from the SDK in this release.
colors provided by the new
AIUIThemeSuite.
themes. All samples that use tools use the new tool types.
Adobe Illustrator CS6 Porting Guide Porting existing plug-ins 9
The new EmptyPanel sample demonstrates how to create panels and control bars with the new
AIPanelSuite and AIControlBarSuite, and how to combine these with controls implemented with
native Windows and Mac OS components.
The SnippetRunner sample has been updated with snippets that demonstrate new features and
techniques, including gradients on strokes (SnpGradient) and the new tracing mechanism (LiveTrace and LiveColor).

Porting existing plug-ins

In order to run existing plug-ins in Illustrator CS6, you must port them to the currently supported development environment for your platform.
In Windows If you have existing plug-ins in a Windows development environment, you must port them to Visual Studio
2010 (VC++ 10).
To convert plug-in projects:
1. Launch Visual Studio 2010(VC++ 10.0).
2. Open your plug-in's project file (
.vcproj).
Visual Studio 2010 launches the Conversion Wizard.
3. Follow the Wizard instructions to finish the conversion.
4. Check the conversion log to see if there are any errors.
Project files for VS2010 have the extension
.vcxproj.
In Mac OS If you have existing plug-ins in a Mac OS development environment, you can simply open them in
Xcode 3.2.5.
Loading...