Adobe.com
Contents Suites Classes Class Index Member Index

AIAnnotatorDrawer.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 /*************************************************************************
00004  * ADOBE CONFIDENTIAL
00005  *
00006  *  Copyright 2018 Adobe Systems Incorporated
00007  *  All Rights Reserved.
00008  *
00009  * NOTICE:  All information contained herein is, and remains
00010  * the property of Adobe Systems Incorporated and its suppliers,
00011  * if any.  The intellectual and technical concepts contained
00012  * herein are proprietary to Adobe Systems Incorporated and its
00013  * suppliers and are protected by all applicable intellectual property
00014  * laws, including trade secret and copyright laws.
00015  * Dissemination of this information or reproduction of this material
00016  * is strictly forbidden unless prior written permission is obtained
00017  * from Adobe Systems Incorporated.
00018  **************************************************************************/
00019 
00020 
00021 /*******************************************************************************
00022 **
00023 **      Imports
00024 **
00025 **/
00026 
00027 #ifndef __AITypes__
00028 #include "AITypes.h"
00029 #endif
00030 
00031 #ifndef __AIPlugin__
00032 #include "AIPlugin.h"
00033 #endif
00034 
00035 #include "AIDocumentView.h"
00036 #include "AIFont.h"
00037 #include "AIAGMTypes.h"
00038 
00039 #include "AIHeaderBegin.h"
00040 
00041 // This Windows macro obscures an API
00042 #undef DrawText
00043 
00047 /*******************************************************************************
00048 **
00049 ** Constants
00050 **
00051 **/
00052 
00053 #define kAIAnnotatorDrawerSuite                         "AI Annotator Drawer Suite"
00054 #define kAIAnnotatorDrawerSuiteVersion7         AIAPI_VERSION(7)
00055 #define kAIAnnotatorDrawerSuiteVersion          kAIAnnotatorDrawerSuiteVersion7
00056 #define kAIAnnotatorDrawerVersion                       kAIAnnotatorDrawerSuiteVersion
00057 
00058 
00059 /*******************************************************************************
00060 **
00061 ** Types
00062 **
00063 **/
00064 
00065 class AIAnnotatorDrawer;                        // Opaque to suite clients
00066 
00070 enum AIHorizAlignment
00071 {
00072         kAILeft,                                                
00073         kAICenter,                                              
00074         kAIRight,                                               
00075         kAIHorizDummy = 0xFFFFFFFF              
00076 };
00077 
00081 enum AIVertAlignment
00082 {
00083         kAITop,                                                 
00084         kAIMiddle,                                              
00085         kAIBottom,                                              
00086         kAIVertDummy = 0xFFFFFFFF               
00087 };
00088 
00092 enum AIAnnotatorFont
00093 {
00094         kAIAFSmall,                                             
00095         kAIAFMedium,                                    
00096         kAIAFLarge,                                             
00097         kAIAFDummy = 0xFFFFFFFF                 
00098 };
00099 
00104 enum AIAnnotatorPortOption
00105 {
00106         kAIOptionAAGraphics = 0x1,              
00107         kDummyPortOption = 0x80000000   
00108 };
00109 
00110 /*******************************************************************************
00111 **
00112 **      Suite Record
00113 **
00114 **/
00115 
00118 #define kDashBufferTooShortError 'SHRT'
00119 
00121 #define kNoStrokeParamsError 'NPRM'
00122 
00124 #define kDashArrayTooBigError 'DBIG'
00125 
00127 #define kNoDashError 'NDSH'
00128 
00137 struct AIAnnotatorDrawerSuite
00138 {
00140 
00141 
00147         AIAPI void (*SetColor)(AIAnnotatorDrawer *drawer, const AIRGBColor &color);
00148 
00155         AIAPI void (*GetColor)(AIAnnotatorDrawer *drawer, AIRGBColor &color);
00157 
00159 
00160 
00165         AIAPI void (*SetLineWidth)(AIAnnotatorDrawer *drawer, const AIReal newWidth);
00171         AIAPI AIReal (*GetLineWidth)(AIAnnotatorDrawer *drawer);
00172 
00179         AIAPI void (*SetLineDashed)(AIAnnotatorDrawer *drawer, AIBoolean dashed);
00186         AIAPI AIBoolean (*GetLineDashed)(AIAnnotatorDrawer *drawer);
00187 
00193         AIAPI AIErr (*DrawLine)(AIAnnotatorDrawer *drawer, const AIPoint &start, const AIPoint &end);
00200         AIAPI AIErr (*DrawRect)(AIAnnotatorDrawer *drawer, const AIRect &rect, AIBoolean fill);
00201 
00209         AIAPI AIErr (*DrawPolygon)(AIAnnotatorDrawer *drawer, const AIPoint points[], ai::uint32 numPoints, AIBoolean fill);
00210 
00217         AIAPI AIErr (*DrawEllipse)(AIAnnotatorDrawer *drawer, const AIRect &rect, AIBoolean fill);
00218 
00231         AIAPI AIErr (*DrawBezier)(AIAnnotatorDrawer *drawer, const AIPoint &start, const AIPoint pointSets[][3], ai::uint32 numPointSets, AIBoolean fill);
00232 
00240         AIAPI AIErr (*SetLineDashedEx)(AIAnnotatorDrawer *drawer, AIFloat dashData[], ai::int32 numDashes);
00241 
00248         AIAPI AIErr (*GetLineDashedEx)(AIAnnotatorDrawer *drawer, AIFloat dashData[], ai::int32 &numDashes);
00249 
00251 
00253 
00254 
00260         AIAPI AIErr (*DrawText)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, const AIPoint &bottomLeft, AIBoolean allowScaling);
00261 
00270         AIAPI AIErr (*DrawTextAligned)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, const AIHorizAlignment horizAlign, const AIVertAlignment vertAlign, const AIRect &rect, AIBoolean allowScaling);
00271 
00281         AIAPI AIErr (*GetTextBounds)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, AIPoint *location,  AIBoolean useFontFallback, AIRect &bounds, AIBoolean allowScaling);
00282 
00287         AIAPI void (*SetFontSize)(AIAnnotatorDrawer *drawer, const AIReal size);
00288 
00294         AIAPI AIReal (*GetFontSize)(AIAnnotatorDrawer *drawer);
00295 
00300         AIAPI AIErr (*SetFontPreset)(AIAnnotatorDrawer *drawer, AIAnnotatorFont font);
00301 
00306         AIAPI AIErr (*SetFontByFontKey)(AIAnnotatorDrawer *drawer, AIFontKey font);
00307 
00314         AIAPI AIErr (*SetFontByName)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &name);
00315 
00322         AIAPI AIFontKey (*GetFontKey)(AIAnnotatorDrawer *drawer);
00323 
00330         AIAPI void (*GetFontName)(AIAnnotatorDrawer *drawer, ai::UnicodeString &name);
00332 
00334 
00335 
00344         AIAPI void (*DefineClipStart)(AIAnnotatorDrawer *drawer);
00345 
00352         AIAPI void (*DefineClipEnd)(AIAnnotatorDrawer *drawer);
00353 
00358         AIAPI void (*ClearClip)(AIAnnotatorDrawer *drawer);
00360 
00362 
00363 
00369         AIAPI AIErr (*SetHighlightMode)(AIAnnotatorDrawer *drawer, AIBoolean highlightOn);
00370 
00376         AIAPI AIBoolean (*GetHighlightMode)(AIAnnotatorDrawer *drawer);
00377 
00383         AIAPI AIErr (*DrawPNGImage)(AIAnnotatorDrawer *drawer, const ai::uint8* inPNGImageData,  ai::uint32 inDataSize, const AIPoint &topLeft);
00384 
00390         AIAPI AIErr (*DrawPNGImageCentered)(AIAnnotatorDrawer *drawer, const ai::uint8* inPNGImageData, ai::uint32 inDataSize, const AIRect &rect);
00391     
00397     AIAPI AIErr (*DrawPNGImageUnscaled)(AIAnnotatorDrawer *drawer, const ai::uint8* inPNGImageData,  ai::uint32 inDataSize, const AIPoint &topLeft);
00398     
00404     AIAPI AIErr (*DrawPNGImageCenteredUnscaled)(AIAnnotatorDrawer *drawer, const ai::uint8* inPNGImageData, ai::uint32 inDataSize, const AIRect &rect);
00405 
00411         AIAPI AIAGMPort* (*GetAGMPort)(AIAnnotatorDrawer *drawer);
00412 
00417         AIAPI void (*ReleaseAGMPort)(AIAGMPort *&aiAGMPort);
00418 
00428         AIAPI AIErr(*GetPortOptions)(AIAnnotatorDrawer* drawer, ai::uint32 whichOptions, ai::uint32 &options);
00429 
00439         AIAPI AIErr(*SetPortOptions)( AIAnnotatorDrawer* drawer, ai::uint32 whichOptions, ai::uint32 options);
00440 
00446         AIAPI AIErr (*SetOpacity)(AIAnnotatorDrawer* drawer, AIReal opacity);
00447 
00454         AIAPI AIReal (*GetOpacity)(AIAnnotatorDrawer* drawer);
00455 };
00456 
00457 
00458 #include "AIHeaderEnd.h"
00459 
00460 


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