LinearGradient Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
LinearGradient(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
LinearGradient(Single, Single, Single, Single, Color, Color, Shader+TileMode) |
Create a shader that draws a linear gradient along a line. |
LinearGradient(Single, Single, Single, Single, Int32[], Single[], Shader+TileMode) |
Create a shader that draws a linear gradient along a line. |
LinearGradient(Single, Single, Single, Single, Int64, Int64, Shader+TileMode) |
Create a shader that draws a linear gradient along a line. |
LinearGradient(Single, Single, Single, Single, Int64[], Single[], Shader+TileMode) |
Create a shader that draws a linear gradient along a line. |
LinearGradient(IntPtr, JniHandleOwnership)
A constructor used when creating managed representations of JNI objects; called by the runtime.
protected LinearGradient (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Graphics.LinearGradient : nativeint * Android.Runtime.JniHandleOwnership -> Android.Graphics.LinearGradient
Parameters
- transfer
- JniHandleOwnership
A JniHandleOwnershipindicating how to handle javaReference
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
LinearGradient(Single, Single, Single, Single, Color, Color, Shader+TileMode)
Create a shader that draws a linear gradient along a line.
[Android.Runtime.Register(".ctor", "(FFFFIILandroid/graphics/Shader$TileMode;)V", "")]
public LinearGradient (float x0, float y0, float x1, float y1, Android.Graphics.Color color0, Android.Graphics.Color color1, Android.Graphics.Shader.TileMode tile);
[<Android.Runtime.Register(".ctor", "(FFFFIILandroid/graphics/Shader$TileMode;)V", "")>]
new Android.Graphics.LinearGradient : single * single * single * single * Android.Graphics.Color * Android.Graphics.Color * Android.Graphics.Shader.TileMode -> Android.Graphics.LinearGradient
Parameters
- x0
- Single
The x-coordinate for the start of the gradient line
- y0
- Single
The y-coordinate for the start of the gradient line
- x1
- Single
The x-coordinate for the end of the gradient line
- y1
- Single
The y-coordinate for the end of the gradient line
- color0
- Color
The sRGB color at the start of the gradient line.
- color1
- Color
The sRGB color at the end of the gradient line.
- tile
- Shader.TileMode
The Shader tiling mode
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
LinearGradient(Single, Single, Single, Single, Int32[], Single[], Shader+TileMode)
Create a shader that draws a linear gradient along a line.
[Android.Runtime.Register(".ctor", "(FFFF[I[FLandroid/graphics/Shader$TileMode;)V", "")]
public LinearGradient (float x0, float y0, float x1, float y1, int[] colors, float[]? positions, Android.Graphics.Shader.TileMode tile);
[<Android.Runtime.Register(".ctor", "(FFFF[I[FLandroid/graphics/Shader$TileMode;)V", "")>]
new Android.Graphics.LinearGradient : single * single * single * single * int[] * single[] * Android.Graphics.Shader.TileMode -> Android.Graphics.LinearGradient
Parameters
- x0
- Single
The x-coordinate for the start of the gradient line
- y0
- Single
The y-coordinate for the start of the gradient line
- x1
- Single
The x-coordinate for the end of the gradient line
- y1
- Single
The y-coordinate for the end of the gradient line
- colors
- Int32[]
- positions
- Single[]
- tile
- Shader.TileMode
The Shader tiling mode
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
LinearGradient(Single, Single, Single, Single, Int64, Int64, Shader+TileMode)
Create a shader that draws a linear gradient along a line.
[Android.Runtime.Register(".ctor", "(FFFFJJLandroid/graphics/Shader$TileMode;)V", "", ApiSince=29)]
public LinearGradient (float x0, float y0, float x1, float y1, long color0, long color1, Android.Graphics.Shader.TileMode tile);
[<Android.Runtime.Register(".ctor", "(FFFFJJLandroid/graphics/Shader$TileMode;)V", "", ApiSince=29)>]
new Android.Graphics.LinearGradient : single * single * single * single * int64 * int64 * Android.Graphics.Shader.TileMode -> Android.Graphics.LinearGradient
Parameters
- x0
- Single
The x-coordinate for the start of the gradient line
- y0
- Single
The y-coordinate for the start of the gradient line
- x1
- Single
The x-coordinate for the end of the gradient line
- y1
- Single
The y-coordinate for the end of the gradient line
- color0
- Int64
The sRGB color at the start of the gradient line.
- color1
- Int64
The sRGB color at the end of the gradient line.
- tile
- Shader.TileMode
The Shader tiling mode
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
LinearGradient(Single, Single, Single, Single, Int64[], Single[], Shader+TileMode)
Create a shader that draws a linear gradient along a line.
[Android.Runtime.Register(".ctor", "(FFFF[J[FLandroid/graphics/Shader$TileMode;)V", "", ApiSince=29)]
public LinearGradient (float x0, float y0, float x1, float y1, long[] colors, float[]? positions, Android.Graphics.Shader.TileMode tile);
[<Android.Runtime.Register(".ctor", "(FFFF[J[FLandroid/graphics/Shader$TileMode;)V", "", ApiSince=29)>]
new Android.Graphics.LinearGradient : single * single * single * single * int64[] * single[] * Android.Graphics.Shader.TileMode -> Android.Graphics.LinearGradient
Parameters
- x0
- Single
The x-coordinate for the start of the gradient line
- y0
- Single
The y-coordinate for the start of the gradient line
- x1
- Single
The x-coordinate for the end of the gradient line
- y1
- Single
The y-coordinate for the end of the gradient line
- colors
- Int64[]
- positions
- Single[]
- tile
- Shader.TileMode
The Shader tiling mode
- Attributes
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.