Adobe.com
Contents Suites Classes Class Index Member Index

AIRaster.h

Go to the documentation of this file.
00001 #ifndef __AIRaster__
00002 #define __AIRaster__
00003 
00004 /*
00005  *        Name: AIRaster.h
00006  *   $Revision: 24 $
00007  *      Author:
00008  *        Date:
00009  *     Purpose: Adobe Illustrator Raster Object Suite.
00010  *
00011  * ADOBE SYSTEMS INCORPORATED
00012  * Copyright 1986-2007 Adobe Systems Incorporated.
00013  * All rights reserved.
00014  *
00015  * NOTICE:  Adobe permits you to use, modify, and distribute this file 
00016  * in accordance with the terms of the Adobe license agreement 
00017  * accompanying it. If you have received this file from a source other 
00018  * than Adobe, then your use, modification, or distribution of it 
00019  * requires the prior written permission of Adobe.
00020  *
00021  */
00022 
00023 
00024 /*******************************************************************************
00025  **
00026  **     Imports
00027  **
00028  **/
00029 
00030 #ifndef __AITypes__
00031 #include "AITypes.h"
00032 #endif
00033 
00034 #ifndef __AIArt__
00035 #include "AIArt.h"
00036 #endif
00037 
00038 #include "IAIFilePath.hpp"
00039 #include "IAIColorSpace.hpp"
00040 
00041 #include "AIHeaderBegin.h"
00042 
00046 /*******************************************************************************
00047  **
00048  **     Constants
00049  **
00050  **/
00051 
00052 #define kAIRasterSuite                  "AI Raster Suite"
00053 #define kAIRasterSuiteVersion10 AIAPI_VERSION(10)
00054 #define kAIRasterSuiteVersion   kAIRasterSuiteVersion10
00055 #define kAIRasterVersion                kAIRasterSuiteVersion
00056 
00057 
00059 enum AIRasterFlags {
00063         kRasterMaskImageType            = 0x0002,
00067         kRasterInvertBits                       = 0x0004,
00071         kRasterGraySubtractive          = 0x0008
00072 };
00073 
00075 #define kMaxChannels            32
00076 
00078 #define kMaxSpotChannels        27
00079 
00081 enum AIRasterColorSpace {
00084         kColorSpaceHasAlpha                     = 0x10,
00085 
00089         kGrayColorSpace                         = 0,
00092         kRGBColorSpace                          = 1,
00096         kCMYKColorSpace                         = 2,
00099         kLabColorSpace                          = 3,
00103         kSeparationColorSpace           = 4,
00108         kNChannelColorSpace                     = 5,
00113         kIndexedColorSpace                      = 6,
00114 
00116         kAlphaGrayColorSpace            = (kGrayColorSpace | kColorSpaceHasAlpha),
00118         kAlphaRGBColorSpace                     = (kRGBColorSpace  | kColorSpaceHasAlpha),
00120         kAlphaCMYKColorSpace            = (kCMYKColorSpace | kColorSpaceHasAlpha),
00122         kAlphaLabColorSpace                     = (kLabColorSpace | kColorSpaceHasAlpha),
00124         kAlphaSeparationColorSpace      = (kSeparationColorSpace | kColorSpaceHasAlpha),
00126         kAlphaNChannelColorSpace        = (kNChannelColorSpace | kColorSpaceHasAlpha),
00128         kAlphaIndexedColorSpace         = (kIndexedColorSpace | kColorSpaceHasAlpha),
00129 
00130         kInvalidColorSpace                      = 0xFF
00131 };
00132 
00135 #define kRasterTypeNotSupportedErr                      'RTYP'
00136 
00138 #define kRasterSpecifiedErr                                     'RSPE'
00139 
00141 #define kRasterBitsPerPixelsNotSupportedErr     'RBIT'
00142 
00144 #define kRasterLinkFileNotFoundErr                      'RFNF'
00145 
00147 #define kRasterLinkPluginNotFoundErr            'RPNF'
00148 
00150 #define kRasterScratchDiskFullErr                       'RFUL'
00151 
00152 
00155 enum AIRasterLinkState {
00158         kAIRasterLinked                         = 0,
00161         kAIRasterEmbedded                       = 1
00162 };
00163 
00166 enum AIRasterDataState {
00169         kAIRasterNoData                         = 0,
00172         kAIRasterLinkData                       = 1,
00175         kAIRasterEditedData                     = 2
00176 };
00177 
00180 enum AIResolveRasterLinkFlags {
00182         kAIResolveCheckExternal         = (1<<0),
00184         kAIResolveCheckFile                     = (1<<1),
00186         kAIResolveVerbose                       = (1<<2),
00188         kAIResolveReplace                       = (1<<3),
00190         kAIResolveSearch                        = (1<<4)
00191 };
00192 
00194  enum AISplitRasterFlags {
00199         kAISplitRasterStandard                  = 0x0000,
00204         kAISplitRasterSeparateProcess   = 0x0001
00205 };
00206 
00207 
00208 /*******************************************************************************
00209  **
00210  **     Types
00211  **
00212  **/
00213 
00232 typedef struct AISlice {
00233         ai::int32 top, left, bottom, right, front, back;
00234 } AISlice;
00235 
00236 
00240 typedef struct AITile {
00244         void            *data;
00249         AISlice         bounds;
00251         ai::int32               rowBytes;
00254         ai::int32               colBytes;
00261         ai::int32               planeBytes;
00265         ai::int16               channelInterleave[kMaxChannels];
00266 } AITile;
00267 
00268 
00270 typedef struct AIRGBColorRec    {
00271         ai::uint8       mustBeZero;             // MUST BE ZERO!!!!
00272         ai::uint8       red;
00273         ai::uint8       green;
00274         ai::uint8       blue;
00275 } AIRGBColorRec;
00276 
00278 typedef struct AIExtendedRGBColorRec {
00279         ai::uint16      mustBeZero;             // MUST BE ZERO!!!!
00280         ai::uint16      red;
00281         ai::uint16      green;
00282         ai::uint16      blue;
00283 } AIExtendedRGBColorRec;
00284 
00286 typedef struct AICMYKColorRec   {
00287         ai::uint8       cyan;
00288         ai::uint8       magenta;
00289         ai::uint8       yellow;
00290         ai::uint8       black;
00291 } AICMYKColorRec;
00292 
00293 
00297 typedef struct AIRasterRecord   {
00300         ai::uint16                      flags;
00306         AIRect                  bounds;
00314         ai::int32                       byteWidth;
00317         ai::int16                       colorSpace;
00324         ai::int16                       bitsPerPixel;
00328         ai::int16                       originalColorSpace;
00329 
00331         AIRasterRecord()
00332                 :       flags(0), byteWidth(0), bitsPerPixel(0),
00333                         colorSpace(kInvalidColorSpace), originalColorSpace(kInvalidColorSpace)                  
00334         {
00335                 bounds.left = bounds.top = bounds.right = bounds.bottom = 0;
00336         }
00337 } AIRasterRecord;
00338 
00339 
00342 struct AIRasterLink {
00344         ai::FilePath file;
00346         ai::int32                       linkstate;
00348         ai::int32                       datastate;
00349 };
00350 
00351 
00356 typedef struct AIRasterOutlineParams {
00358         ai::int32 noiseFilterDegree;
00360         double cornerAngleTolerance;
00362         double smoothnessTolerance;
00364         double fidelityTolerance;
00365 } AIRasterOutlineParams;
00366 
00369 typedef struct AIRasterOutlineConsumer {
00374         AIAPI AIErr (*BeginComponent) ( void* self, ai::int32 knots );
00381         AIAPI AIErr (*PutKnot) ( void* self, AIRealPoint in, AIRealPoint p, AIRealPoint out);
00385         AIAPI AIErr (*EndComponent) ( void* self );
00386 } AIRasterOutlineConsumer;
00387 
00388 
00389 /*******************************************************************************
00390  **
00391  **     Suite
00392  **
00393  **/
00394 
00525 typedef struct AIRasterSuite {
00526 
00531         AIAPI AIErr (*GetRasterInfo) ( AIArtHandle raster, AIRasterRecord *info );
00532 
00539         AIAPI AIErr (*SetRasterInfo) ( AIArtHandle raster, AIRasterRecord *info );
00540 
00547         AIAPI AIErr (*GetRasterFileSpecification) ( AIArtHandle raster, ai::FilePath& file );
00548 
00550         AIAPI AIErr (*SetRasterFileSpecification) ( AIArtHandle raster, const ai::FilePath& );
00551 
00559         AIAPI AIErr (*GetRasterMatrix) ( AIArtHandle raster, AIRealMatrix *matrix );
00560 
00567         AIAPI AIErr (*SetRasterMatrix) ( AIArtHandle raster, AIRealMatrix *matrix );
00568 
00578         AIAPI AIErr (*GetRasterBoundingBox) ( AIArtHandle raster, AIRealRect *bbox );
00579 
00590         AIAPI AIErr (*SetRasterBoundingBox) ( AIArtHandle raster, AIRealRect *bbox );
00591 
00602         AIAPI AIErr (*GetRasterTile) ( AIArtHandle raster, AISlice *artSlice, AITile *workTile, AISlice *workSlice );
00603 
00615         AIAPI AIErr (*SetRasterTile) ( AIArtHandle raster, AISlice *artSlice, AITile *workTile, AISlice *workSlice );
00616 
00623         AIAPI AIErr (*GetRasterLink) ( AIArtHandle raster, AIRasterLink &link );
00624 
00631         AIAPI AIErr (*SetRasterLink) ( AIArtHandle raster, const AIRasterLink &link );
00632 
00656         AIAPI AIErr (*ResolveRasterLink) ( AIArtHandle raster, ai::int32 flags );
00657 
00669         AIAPI AIErr (*GetRasterFileInfoFromArt) ( AIArtHandle raster, SPPlatformFileInfo *pSPFileInfo );
00670 
00681         AIAPI AIErr (*GetRasterFileInfoFromFile) ( AIArtHandle raster, SPPlatformFileInfo *pSPFileInfo );
00682 
00689         AIAPI AIErr (*GetRasterFilePathFromArt) ( AIArtHandle raster, ai::UnicodeString &path );
00690 
00697         AIAPI AIErr (*CountLevels) ( AIArtHandle raster, ai::int32* count );
00698 
00722         AIAPI AIErr (*GetLevelInfo) ( AIArtHandle raster, ai::int32 level, AIRasterRecord *info );
00723 
00736         AIAPI AIErr (*GetLevelTile) ( AIArtHandle raster, ai::int32 level, AISlice *artSlice,
00737                         AITile *workTile, AISlice *workSlice );
00738 
00747         AIAPI AIErr (*ExtractOutline) ( AIArtHandle raster, const AIRasterOutlineParams* params,
00748                 AIRasterOutlineConsumer* consumer );
00749 
00754         AIAPI AIErr (*ConcatRasterMatrix) ( AIArtHandle raster, AIRealMatrix *concat );
00755 
00763     AIAPI AIErr (*SetColorSpaceInfo) ( AIArtHandle raster, const ai::ColorSpace &cs);
00764 
00774     AIAPI AIErr (*GetColorSpaceInfo) ( AIArtHandle raster, ai::ColorSpace &cs);
00775 
00780     AIAPI AIErr (*SetOverprint) ( AIArtHandle raster, AIBoolean enable);
00781 
00787     AIAPI AIErr (*GetOverprint) ( AIArtHandle raster, AIBoolean *status );
00788 
00796      AIAPI AIErr (*IsColorized) ( AIArtHandle raster, AIBoolean *isColorized, AIBoolean *isAdditive );
00797 
00801         AIAPI AIErr (*ClearColorization) ( AIArtHandle raster );
00806      AIAPI AIErr (*ConvertColors) ( AIArtHandle *raster, const ai::ColorSpace &dstCS );
00810      AIAPI AIErr (*InvertColors) ( AIArtHandle *raster );
00811 
00827          AIAPI AIErr (*SplitChannels) ( AIArtHandle raster, AIArtHandle **rasterArray, ai::int32 *numRasters, ai::uint32 flags );
00828 
00843          AIAPI AIErr (*InterleaveChannels) ( AIArtHandle *rasterArray, ai::int32 numRasters, AIArtHandle *raster, ai::uint32 flags );
00844 
00845 } AIRasterSuite;
00846 
00847 
00848 #include "AIHeaderEnd.h"
00849 
00850 
00851 #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