InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IOpacityGradientStops.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Matt Phillips
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //
23 // Defines an opacity gradient's data. Similar to gradient fill data, but at each stop
24 // there's only a simple PMReal opacity, not a full set. That, and the gradient type
25 // is stored externally since in the future we may want to add this interface onto
26 // color gradients, which would then create a conflict of attributes problem.
27 //
28 // Note that an empty gradient is assumed to be equivalent to not having a gradient
29 // (ie, constant alpha=1).
30 //
31 //========================================================================================
32 
33 
34 #include "IPMUnknown.h"
35 #include "XPID.h"
36 #include "GraphicTypes.h"
37 
39 {
40 public:
41  enum { kDefaultIID = IID_IOPACITYGRADIENTSTOPS };
42 
43 public:
46  virtual void ResetToDefault() = 0;
47 
51  virtual void DeleteAllStops() = 0;
52 
56  virtual int32 GetNumStops() const = 0;
57 
62  virtual int32 InsertStop(int32 beforeStop = -1) = 0;
63 
68  virtual bool32 DeleteStop(int32 whichStop) = 0;
69 
74  virtual void SetStopOpacity(int32 whichStop, PMReal opacity) = 0;
75 
80  virtual PMReal GetStopOpacity(int32 whichStop) const = 0;
81 
91  virtual int32 SetStopPosition(int32 whichStop, PMReal position, bool32 autoRearrange = kTrue) = 0;
92 
97  virtual PMReal GetStopPosition(int32 whichStop) const = 0;
98 
103  virtual void SetStopMidpoint(int32 whichStop, PMReal midpoint) = 0;
104 
109  virtual PMReal GetStopMidpoint(int32 whichStop) const = 0;
110 
115  virtual void SetStopMidpointRelativeLocation(int32 whichStop, PMReal relLoc) = 0;
116 
121  virtual PMReal GetStopMidpointRelativeLocation(int32 whichStop) const = 0;
122 
127  virtual bool16 Equals(const IOpacityGradientStops* iOther) const = 0;
128 
132  virtual void CopyFrom(const IOpacityGradientStops* iOther) = 0;
133 
139  virtual IDataBase* GetDataBase (void) const = 0;
140 };
141 
142 
143 
144 
145 
146 
147 
148