-
Notifications
You must be signed in to change notification settings - Fork 42
/
CIGaussianGradient.xml
337 lines (330 loc) · 17.4 KB
/
CIGaussianGradient.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
<Type Name="CIGaussianGradient" FullName="CoreImage.CIGaussianGradient">
<TypeSignature Language="C#" Value="public class CIGaussianGradient : CoreImage.CIFilter" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit CIGaussianGradient extends CoreImage.CIFilter" />
<TypeSignature Language="DocId" Value="T:CoreImage.CIGaussianGradient" />
<TypeSignature Language="F#" Value="type CIGaussianGradient = class
 inherit CIFilter" />
<AssemblyInfo>
<AssemblyName>Xamarin.iOS</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Xamarin.Mac</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>CoreImage.CIFilter</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Generates a gradient that fades via a 2D Gaussian distribution</summary>
<remarks>
<para>The following example shows this filter in use</para>
<example>
<code lang="csharp lang-csharp"><![CDATA[
// Create the Vector that represents the Center of the gradient
var centerVector = new CIVector (100, 100); // Default is [150 150]
// Create the two colors to form the Gradient.
var color1 = CIColor.FromRgba (1, 0, 1, 1);
var color0 = CIColor.FromRgba (0, 1, 1, 1);
// Constructor the actual GaussianGradient filter
var gaussGradient = new CIGaussianGradient ()
{
Center = centerVector,
Color0 = color0,
Color1 = color1,
Radius = 280f // Default is 300
};
// The Generator Filters need to be cropped before they can be displayed
var crop = new CICrop ()
{
Image = gaussGradient.OutputImage,
// Create the Bounds based on the Size of the application Window. (UIWindow)
Rectangle = new CIVector (0, 0, window.Bounds.Width, window.Bounds.Height)
};
// Get the Final Cropped Image
var output = crop.OutputImage;
// To render the results, we need to create a context, and then
// use one of the context rendering APIs, in this case, we render the
// result into a CoreGraphics image, which is merely a useful representation
//
var context = CIContext.FromOptions (null);
var cgimage = context.CreateCGImage (output, output.Extent);
// The above cgimage can be added to a screen view, for example, this
// would add it to a UIImageView on the screen:
myImageView.Image = UIImage.FromImage (cgimage);
]]></code>
</example>
<para>
Produces the following output:
</para>
<para>
<img href="~/CoreImage/_images/GaussianGradient.png" alt="Result of applying the filter." />
</para>
</remarks>
<related type="sample" href="https://github.com/xamarin/ios-samples/tree/master/CoreImage">Core Image</related>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CIGaussianGradient ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:CoreImage.CIGaussianGradient.#ctor" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Xamarin.Mac</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Creates an instance of the CIGaussianGradient image filter</summary>
<remarks>You can customize the behavior of this filter by setting the properties of this object before you run the CIContext pipeline.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CIGaussianGradient (Foundation.NSCoder coder);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class Foundation.NSCoder coder) cil managed" />
<MemberSignature Language="DocId" Value="M:CoreImage.CIGaussianGradient.#ctor(Foundation.NSCoder)" />
<MemberSignature Language="F#" Value="new CoreImage.CIGaussianGradient : Foundation.NSCoder -> CoreImage.CIGaussianGradient" Usage="new CoreImage.CIGaussianGradient coder" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Xamarin.Mac</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>Foundation.Export("initWithCoder:")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="coder" Type="Foundation.NSCoder" />
</Parameters>
<Docs>
<param name="coder">The unarchiver object.</param>
<summary>A constructor that initializes the object from the data stored in the unarchiver object.</summary>
<remarks>
<para>This constructor is provided to allow the class to be initialized from an unarchiver (for example, during NIB deserialization). This is part of the <see cref="T:Foundation.NSCoding" /> protocol.</para>
<para>If developers want to create a subclass of this object and continue to support deserialization from an archive, they should implement a constructor with an identical signature: taking a single parameter of type <see cref="T:Foundation.NSCoder" /> and decorate it with the [Export("initWithCoder:"] attribute declaration.</para>
<para>The state of this object can also be serialized by using the companion method, EncodeTo.</para>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected CIGaussianGradient (Foundation.NSObjectFlag t);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(class Foundation.NSObjectFlag t) cil managed" />
<MemberSignature Language="DocId" Value="M:CoreImage.CIGaussianGradient.#ctor(Foundation.NSObjectFlag)" />
<MemberSignature Language="F#" Value="new CoreImage.CIGaussianGradient : Foundation.NSObjectFlag -> CoreImage.CIGaussianGradient" Usage="new CoreImage.CIGaussianGradient t" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Xamarin.Mac</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="t" Type="Foundation.NSObjectFlag" />
</Parameters>
<Docs>
<param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
<summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
<remarks>
<para>This constructor should be called by derived classes when they completely construct the object in managed code and merely want the runtime to allocate and initialize the NSObject. This is required to implement the two-step initialization process that Objective-C uses, the first step is to perform the object allocation, the second step is to initialize the object. When developers invoke the constructor that takes the NSObjectFlag.Empty they take advantage of a direct path that goes all the way up to NSObject to merely allocate the object's memory and bind the Objective-C and C# objects together. The actual initialization of the object is up to the developer.</para>
<para>This constructor is typically used by the binding generator to allocate the object, but prevent the actual initialization to take place. Once the allocation has taken place, the constructor has to initialize the object. With constructors generated by the binding generator this means that it manually invokes one of the "init" methods to initialize the object.</para>
<para>It is the developer's responsibility to completely initialize the object if they chain up using the NSObjectFlag.Empty path.</para>
<para>In general, if the developer's constructor invokes the NSObjectFlag.Empty base implementation, then it should be calling an Objective-C init method. If this is not the case, developers should instead chain to the proper constructor in their class. </para>
<para>The argument value is ignored and merely ensures that the only code that is executed is the construction phase is the basic NSObject allocation and runtime type registration. Typically the chaining would look like this:</para>
<example>
<code lang="csharp lang-csharp"><![CDATA[
//
// The NSObjectFlag merely allocates the object and registers the
// C# class with the Objective-C runtime if necessary, but no actual
// initXxx method is invoked, that is done later in the constructor
//
// This is taken from Xamarin.iOS's source code:
//
[Export ("initWithFrame:")]
public UIView (System.Drawing.RectangleF frame) : base (NSObjectFlag.Empty)
{
// Invoke the init method now.
var initWithFrame = new Selector ("initWithFrame:").Handle;
if (IsDirectBinding)
Handle = ObjCRuntime.Messaging.IntPtr_objc_msgSend_CGRect (this.Handle, initWithFrame, frame);
else
Handle = ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_CGRect (this.SuperHandle, initWithFrame, frame);
}
]]></code>
</example>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CIGaussianGradient (IntPtr handle);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(native int handle) cil managed" />
<MemberSignature Language="DocId" Value="M:CoreImage.CIGaussianGradient.#ctor(System.IntPtr)" />
<MemberSignature Language="F#" Value="new CoreImage.CIGaussianGradient : nativeint -> CoreImage.CIGaussianGradient" Usage="new CoreImage.CIGaussianGradient handle" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Xamarin.Mac</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="handle" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="handle">Pointer (handle) to the unmanaged object.</param>
<summary>A constructor used when creating managed representations of unmanaged objects; Called by the runtime.</summary>
<remarks>
<para>This constructor is invoked by the runtime infrastructure (<see cref="M:ObjCRuntime.Runtime.GetNSObject(System.IntPtr)" />) to create a new managed representation for a pointer to an unmanaged Objective-C object. Developers should not invoke this method directly, instead they should call the GetNSObject method as it will prevent two instances of a managed object to point to the same native object.</para>
</remarks>
</Docs>
</Member>
<Member MemberName="Center">
<MemberSignature Language="C#" Value="public CoreImage.CIVector Center { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class CoreImage.CIVector Center" />
<MemberSignature Language="DocId" Value="P:CoreImage.CIGaussianGradient.Center" />
<MemberSignature Language="F#" Value="member this.Center : CoreImage.CIVector with get, set" Usage="CoreImage.CIGaussianGradient.Center" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Xamarin.Mac</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>CoreImage.CIVector</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the center of the gradient.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Color0">
<MemberSignature Language="C#" Value="public CoreImage.CIColor Color0 { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class CoreImage.CIColor Color0" />
<MemberSignature Language="DocId" Value="P:CoreImage.CIGaussianGradient.Color0" />
<MemberSignature Language="F#" Value="member this.Color0 : CoreImage.CIColor with get, set" Usage="CoreImage.CIGaussianGradient.Color0" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Xamarin.Mac</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>CoreImage.CIColor</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the color at the center of the gradient.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Color1">
<MemberSignature Language="C#" Value="public CoreImage.CIColor Color1 { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class CoreImage.CIColor Color1" />
<MemberSignature Language="DocId" Value="P:CoreImage.CIGaussianGradient.Color1" />
<MemberSignature Language="F#" Value="member this.Color1 : CoreImage.CIColor with get, set" Usage="CoreImage.CIGaussianGradient.Color1" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Xamarin.Mac</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>CoreImage.CIColor</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the color at the edge and beyond of the gradient.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Radius">
<MemberSignature Language="C#" Value="public float Radius { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance float32 Radius" />
<MemberSignature Language="DocId" Value="P:CoreImage.CIGaussianGradient.Radius" />
<MemberSignature Language="F#" Value="member this.Radius : single with get, set" Usage="CoreImage.CIGaussianGradient.Radius" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<AssemblyName>Xamarin.iOS</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>Xamarin.Mac</AssemblyName>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Single</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the radius of the gradient.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>