Adobe.com
Contents Suites Classes Class Index Member Index

AILimits.h

Go to the documentation of this file.
00001 /*************************************************************************
00002 * ADOBE CONFIDENTIAL
00003 * 
00004 * Copyright 2017 Adobe
00005 * All Rights Reserved.
00006 * 
00007 * NOTICE: Adobe permits you to use, modify, and distribute this file in
00008 * accordance with the terms of the Adobe license agreement accompanying
00009 * it. If you have received this file from a source other than Adobe,
00010 * then your use, modification, or distribution of it requires the prior
00011 * written permission of Adobe.
00012 **************************************************************************/
00013 
00014 #pragma once
00015 
00016 
00017 #define kAILimitsSuite                                  "AI Limits Suite"
00018 #define kAILimitsSuiteVersion                   AIAPI_VERSION(2)  
00019 #define kAILimitsVersion                                kAILimitsSuiteVersion
00020 
00021 #include <limits>
00022 
00023 #include "AITypes.h"
00024 
00025 namespace ai
00026 {
00027         constexpr auto kInfinity = std::numeric_limits<AIReal>::infinity();
00028 
00029         // Use following constants for initializing "bounds" which will contain a union of bounds.
00030         // kNullUnionBoundsSoft has max limits considering axis +Y going in bottom
00031         // kNullUnionBoundsHard has max limits considering axis +Y going in top (+X going in left in both of above)
00032         //                                                                                              {       LEFT,           TOP,            RIGHT,            BOTTOM   };
00033         constexpr AIRealRect kNullUnionBoundsHard{ kInfinity , kInfinity  , -kInfinity , -kInfinity };
00034         constexpr AIRealRect kNullUnionBoundsSoft{ kInfinity , -kInfinity , -kInfinity ,  kInfinity };
00035 
00036 }
00037 
00038 #include "AIHeaderBegin.h"
00039 /*******************************************************************************
00040 **
00041 **      Suite
00042 **
00043 **/
00044 
00052 enum class AIDecimalPrecisionType : ai::uint16
00053 {
00054         kValue = 0,             // precision for general value inputs like color, opacity etc
00055         kDimension,             // precision for dimensions like length, height etc
00056         kType,              // for values related to text
00057         kScale,                 // for scaling factors
00058         kArtboardSize,  // for artboard dimensions
00059         kPercentage,    // for percentage values
00060         kColor,                 // precision for color values
00061         kAngle,                 // for angle values
00062     kResolution,     // for resolution values
00063         kStroke //Precision for stroke dimension
00064 };
00065 
00066 struct AILimitsSuite
00067 {
00072         AIAPI ai::int32(*GetCanvasSize)();
00073 
00078         AIAPI AIReal(*GetLargeCanvasScale)();
00079 
00080         AIAPI ai::int32(*GetDecimalPrecision)(AIDecimalPrecisionType type);
00081     AIAPI AIReal(*GetMinTransformDimensionValue)();
00082 };
00083 
00084 #include "AIHeaderEnd.h"
00085 
00086 
00087 
00088 
00089 
00090 
00091 


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