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 #include "AIRasterTypes.h"
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 /*******************************************************************************/
00058 using AIRasterColorSpace = ai::RasterColorSpace;
00059 using AIRasterDataState = ai::RasterDataState;
00060 using ai::kColorSpaceHasAlpha;
00061 using ai::kGrayColorSpace;
00062 using ai::kRGBColorSpace;
00063 using ai::kCMYKColorSpace;
00064 using ai::kLabColorSpace;
00065 using ai::kSeparationColorSpace;
00066 using ai::kNChannelColorSpace;
00067 using ai::kIndexedColorSpace;
00068 using ai::kAlphaGrayColorSpace;
00069 using ai::kAlphaRGBColorSpace;
00070 using ai::kAlphaCMYKColorSpace;
00071 using ai::kAlphaLabColorSpace;
00072 using ai::kAlphaSeparationColorSpace;
00073 using ai::kAlphaNChannelColorSpace;
00074 using ai::kAlphaIndexedColorSpace;
00075 using ai::kInvalidColorSpace;
00076 using ai::kAIRasterNoData;
00077 using ai::kAIRasterLinkData;
00078 using ai::kAIRasterEditedData;
00079  
00080 
00082 enum AIRasterFlags {
00086         kRasterMaskImageType            = 0x0002,
00090         kRasterInvertBits                       = 0x0004,
00094         kRasterGraySubtractive          = 0x0008
00095 };
00096 
00098 #define kMaxChannels            32
00099 
00101 #define kMaxSpotChannels        27
00102 
00105 #define kRasterTypeNotSupportedErr                      'RTYP'
00106 
00108 #define kRasterSpecifiedErr                                     'RSPE'
00109 
00111 #define kRasterBitsPerPixelsNotSupportedErr     'RBIT'
00112 
00114 #define kRasterLinkFileNotFoundErr                      'RFNF'
00115 
00117 #define kRasterLinkPluginNotFoundErr            'RPNF'
00118 
00120 #define kRasterScratchDiskFullErr                       'RFUL'
00121 
00122 
00125 enum AIRasterLinkState {
00128         kAIRasterLinked                         = 0,
00131         kAIRasterEmbedded                       = 1
00132 };
00133 
00136 enum AIResolveRasterLinkFlags {
00138         kAIResolveCheckExternal         = (1<<0),
00140         kAIResolveCheckFile                     = (1<<1),
00142         kAIResolveVerbose                       = (1<<2),
00144         kAIResolveReplace                       = (1<<3),
00146         kAIResolveSearch                        = (1<<4)
00147 };
00148 
00150  enum AISplitRasterFlags {
00155         kAISplitRasterStandard                  = 0x0000,
00160         kAISplitRasterSeparateProcess   = 0x0001
00161 };
00162 
00163 
00164 /*******************************************************************************
00165  **
00166  **     Types
00167  **
00168  **/
00169 
00188 typedef struct AISlice {
00189         ai::int32 top, left, bottom, right, front, back;
00190         void Init()
00191         {
00192                 top = left = bottom = right = front = back = 0;
00193         }
00194 } AISlice;
00195 
00196 
00200 typedef struct AITile {
00204         void            *data;
00209         AISlice         bounds;
00211         ai::int32               rowBytes;
00214         ai::int32               colBytes;
00221         ai::int32               planeBytes;
00225         ai::int16               channelInterleave[kMaxChannels];
00226         void                    Init()
00227         {
00228                 data = nullptr;
00229                 bounds.Init();
00230                 rowBytes = colBytes = planeBytes = 0;
00231                 for (size_t i = 0; (i < kMaxChannels); ++i)
00232                 {
00233                         channelInterleave[i] = 0;
00234                 }
00235         }
00236 } AITile;
00237 
00238 
00240 typedef struct AIRGBColorRec    {
00241         ai::uint8       mustBeZero;             // MUST BE ZERO!!!!
00242         ai::uint8       red;
00243         ai::uint8       green;
00244         ai::uint8       blue;
00245 } AIRGBColorRec;
00246 
00248 typedef struct AIExtendedRGBColorRec {
00249         ai::uint16      mustBeZero;             // MUST BE ZERO!!!!
00250         ai::uint16      red;
00251         ai::uint16      green;
00252         ai::uint16      blue;
00253 } AIExtendedRGBColorRec;
00254 
00256 typedef struct AICMYKColorRec   {
00257         ai::uint8       cyan;
00258         ai::uint8       magenta;
00259         ai::uint8       yellow;
00260         ai::uint8       black;
00261 } AICMYKColorRec;
00262 
00263 
00267 typedef struct AIRasterRecord   {
00270         ai::uint16                      flags;
00276         AIRect                  bounds;
00284         ai::int32                       byteWidth;
00287         ai::int16                       colorSpace;
00294         ai::int16                       bitsPerPixel;
00298         ai::int16                       originalColorSpace;
00299 
00301         AIRasterRecord()
00302                 :       flags(0), byteWidth(0), bitsPerPixel(0),
00303                         colorSpace(kInvalidColorSpace), originalColorSpace(kInvalidColorSpace)                  
00304         {
00305                 bounds.left = bounds.top = bounds.right = bounds.bottom = 0;
00306         }
00307 } AIRasterRecord;
00308 
00309 
00312 struct AIRasterLink {
00314         ai::FilePath file;
00316         ai::int32                       linkstate;
00318         ai::int32                       datastate;
00319 };
00320 
00321 
00326 typedef struct AIRasterOutlineParams {
00328         ai::int32 noiseFilterDegree;
00330         double cornerAngleTolerance;
00332         double smoothnessTolerance;
00334         double fidelityTolerance;
00335 } AIRasterOutlineParams;
00336 
00339 typedef struct AIRasterOutlineConsumer {
00344         AIAPI AIErr (*BeginComponent) ( void* self, ai::int32 knots );
00351         AIAPI AIErr (*PutKnot) ( void* self, AIRealPoint in, AIRealPoint p, AIRealPoint out);
00355         AIAPI AIErr (*EndComponent) ( void* self );
00356 } AIRasterOutlineConsumer;
00357 
00358 
00359 /*******************************************************************************
00360  **
00361  **     Suite
00362  **
00363  **/
00364 
00495 typedef struct AIRasterSuite {
00496 
00501         AIAPI AIErr (*GetRasterInfo) ( AIArtHandle raster, AIRasterRecord *info );
00502 
00509         AIAPI AIErr (*SetRasterInfo) ( AIArtHandle raster, AIRasterRecord *info );
00510 
00517         AIAPI AIErr (*GetRasterFileSpecification) ( AIArtHandle raster, ai::FilePath& file );
00518 
00520         AIAPI AIErr (*SetRasterFileSpecification) ( AIArtHandle raster, const ai::FilePath& );
00521 
00529         AIAPI AIErr (*GetRasterMatrix) ( AIArtHandle raster, AIRealMatrix *matrix );
00530 
00537         AIAPI AIErr (*SetRasterMatrix) ( AIArtHandle raster, AIRealMatrix *matrix );
00538 
00548         AIAPI AIErr (*GetRasterBoundingBox) ( AIArtHandle raster, AIRealRect *bbox );
00549 
00560         AIAPI AIErr (*SetRasterBoundingBox) ( AIArtHandle raster, AIRealRect *bbox );
00561 
00572         AIAPI AIErr (*GetRasterTile) ( AIArtHandle raster, AISlice *artSlice, AITile *workTile, AISlice *workSlice );
00573 
00585         AIAPI AIErr (*SetRasterTile) ( AIArtHandle raster, AISlice *artSlice, AITile *workTile, AISlice *workSlice );
00586 
00593         AIAPI AIErr (*GetRasterLink) ( AIArtHandle raster, AIRasterLink &link );
00594 
00601         AIAPI AIErr (*SetRasterLink) ( AIArtHandle raster, const AIRasterLink &link );
00602 
00626         AIAPI AIErr (*ResolveRasterLink) ( AIArtHandle raster, ai::int32 flags );
00627 
00639         AIAPI AIErr (*GetRasterFileInfoFromArt) ( AIArtHandle raster, SPPlatformFileInfo *pSPFileInfo );
00640 
00651         AIAPI AIErr (*GetRasterFileInfoFromFile) ( AIArtHandle raster, SPPlatformFileInfo *pSPFileInfo );
00652 
00659         AIAPI AIErr (*GetRasterFilePathFromArt) ( AIArtHandle raster, ai::UnicodeString &path );
00660 
00667         AIAPI AIErr (*CountLevels) ( AIArtHandle raster, ai::int32* count );
00668 
00692         AIAPI AIErr (*GetLevelInfo) ( AIArtHandle raster, ai::int32 level, AIRasterRecord *info );
00693 
00706         AIAPI AIErr (*GetLevelTile) ( AIArtHandle raster, ai::int32 level, AISlice *artSlice,
00707                         AITile *workTile, AISlice *workSlice );
00708 
00717         AIAPI AIErr (*ExtractOutline) ( AIArtHandle raster, const AIRasterOutlineParams* params,
00718                 AIRasterOutlineConsumer* consumer );
00719 
00724         AIAPI AIErr (*ConcatRasterMatrix) ( AIArtHandle raster, AIRealMatrix *concat );
00725 
00733     AIAPI AIErr (*SetColorSpaceInfo) ( AIArtHandle raster, const ai::ColorSpace &cs);
00734 
00744     AIAPI AIErr (*GetColorSpaceInfo) ( AIArtHandle raster, ai::ColorSpace &cs);
00745 
00750     AIAPI AIErr (*SetOverprint) ( AIArtHandle raster, AIBoolean enable);
00751 
00757     AIAPI AIErr (*GetOverprint) ( AIArtHandle raster, AIBoolean *status );
00758 
00766      AIAPI AIErr (*IsColorized) ( AIArtHandle raster, AIBoolean *isColorized, AIBoolean *isAdditive );
00767 
00771         AIAPI AIErr (*ClearColorization) ( AIArtHandle raster );
00776      AIAPI AIErr (*ConvertColors) ( AIArtHandle *raster, const ai::ColorSpace &dstCS );
00780      AIAPI AIErr (*InvertColors) ( AIArtHandle *raster );
00781 
00797          AIAPI AIErr (*SplitChannels) ( AIArtHandle raster, AIArtHandle **rasterArray, ai::int32 *numRasters, ai::uint32 flags );
00798 
00813          AIAPI AIErr (*InterleaveChannels) ( AIArtHandle *rasterArray, ai::int32 numRasters, AIArtHandle *raster, ai::uint32 flags );
00814 
00815 } AIRasterSuite;
00816 
00817 
00818 #include "AIHeaderEnd.h"
00819 
00820 
00821 #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