☰
Shader
Methods
fractal_perlin_noise
image
is_a_image
is_opaque
linear_gradient
linear_gradient_with_interpolation
radial_gradient
radial_gradient_with_interpolation
sweep_gradient
sweep_gradient_with_interpolation
turbulence_perlin_noise
two_point_conical_gradient
two_point_conical_gradient_with_interpolation
with_color_filter
with_local_matrix
Trait Implementations
Debug
Default
Send
Sync
In skia_safe
?
Type Definition
skia_safe
::
Shader
source
·
[
−
]
pub type Shader =
RCHandle
<
SkShader
>;
Implementations
§
source
§
impl
Shader
source
pub fn
is_opaque
(&self) ->
bool
source
pub fn
image
(&self) ->
Option
<(
Image
,
Matrix
, (
TileMode
,
TileMode
))>
source
pub fn
is_a_image
(&self) ->
bool
source
pub fn
with_local_matrix
(&self, matrix: &
Matrix
) -> Self
source
pub fn
with_color_filter
(&self, color_filter: impl
Into
<
ColorFilter
>) -> Self
source
§
impl
Shader
source
pub fn
linear_gradient
<'a>( points: (impl
Into
<
Point
>, impl
Into
<
Point
>), colors: impl
Into
<
GradientShaderColors
<'a>>, pos: impl
Into
<
Option
<&'a [
scalar
]>>, mode:
TileMode
, flags: impl
Into
<
Option
<
Flags
>>, local_matrix: impl
Into
<
Option
<&'a
Matrix
>> ) ->
Option
<Self>
source
pub fn
linear_gradient_with_interpolation
<'a>( points: (impl
Into
<
Point
>, impl
Into
<
Point
>), colors: (&[
Color4f
], impl
Into
<
Option
<
ColorSpace
>>), pos: impl
Into
<
Option
<&'a [
scalar
]>>, mode:
TileMode
, interpolation: impl
Into
<
Interpolation
>, local_matrix: impl
Into
<
Option
<&'a
Matrix
>> ) ->
Option
<Self>
source
pub fn
radial_gradient
<'a>( center: impl
Into
<
Point
>, radius:
scalar
, colors: impl
Into
<
GradientShaderColors
<'a>>, pos: impl
Into
<
Option
<&'a [
scalar
]>>, mode:
TileMode
, flags: impl
Into
<
Option
<
Flags
>>, local_matrix: impl
Into
<
Option
<&'a
Matrix
>> ) ->
Option
<Self>
source
pub fn
radial_gradient_with_interpolation
<'a>( center_and_radius: (impl
Into
<
Point
>,
scalar
), colors: (&[
Color4f
], impl
Into
<
Option
<
ColorSpace
>>), pos: impl
Into
<
Option
<&'a [
scalar
]>>, mode:
TileMode
, interpolation: impl
Into
<
Interpolation
>, local_matrix: impl
Into
<
Option
<&'a
Matrix
>> ) ->
Option
<
Shader
>
source
pub fn
two_point_conical_gradient
<'a>( start: impl
Into
<
Point
>, start_radius:
scalar
, end: impl
Into
<
Point
>, end_radius:
scalar
, colors: impl
Into
<
GradientShaderColors
<'a>>, pos: impl
Into
<
Option
<&'a [
scalar
]>>, mode:
TileMode
, flags: impl
Into
<
Option
<
Flags
>>, local_matrix: impl
Into
<
Option
<&'a
Matrix
>> ) ->
Option
<Self>
source
pub fn
two_point_conical_gradient_with_interpolation
<'a>( start_and_radius: (impl
Into
<
Point
>,
scalar
), end_and_radius: (impl
Into
<
Point
>,
scalar
), colors: (&[
Color4f
], impl
Into
<
Option
<
ColorSpace
>>), pos: impl
Into
<
Option
<&'a [
scalar
]>>, mode:
TileMode
, interpolation: impl
Into
<
Interpolation
>, local_matrix: impl
Into
<
Option
<&'a
Matrix
>> ) ->
Option
<
Shader
>
source
pub fn
sweep_gradient
<'a>( center: impl
Into
<
Point
>, colors: impl
Into
<
GradientShaderColors
<'a>>, pos: impl
Into
<
Option
<&'a [
scalar
]>>, mode:
TileMode
, angles: impl
Into
<
Option
<(
scalar
,
scalar
)>>, flags: impl
Into
<
Option
<
Flags
>>, local_matrix: impl
Into
<
Option
<&'a
Matrix
>> ) ->
Option
<Self>
source
pub fn
sweep_gradient_with_interpolation
<'a>( center: impl
Into
<
Point
>, colors: (&[
Color4f
], impl
Into
<
Option
<
ColorSpace
>>), pos: impl
Into
<
Option
<&'a [
scalar
]>>, mode:
TileMode
, angles: impl
Into
<
Option
<(
scalar
,
scalar
)>>, interpolation: impl
Into
<
Interpolation
>, local_matrix: impl
Into
<
Option
<&'a
Matrix
>> ) ->
Option
<
Shader
>
source
§
impl
Shader
source
pub fn
fractal_perlin_noise
( base_frequency: (
scalar
,
scalar
), num_octaves:
usize
, seed:
scalar
, tile_size: impl
Into
<
Option
<
ISize
>> ) ->
Option
<Self>
source
pub fn
turbulence_perlin_noise
( base_frequency: (
scalar
,
scalar
), num_octaves:
usize
, seed:
scalar
, tile_size: impl
Into
<
Option
<
ISize
>> ) ->
Option
<Self>
Trait Implementations
§
source
§
impl
Debug
for
Shader
source
§
fn
fmt
(&self, f: &mut
Formatter
<'_>) ->
Result
Formats the value using the given formatter.
Read more
source
§
impl
Default
for
Shader
source
§
fn
default
() -> Self
Returns the “default value” for a type.
Read more
source
§
impl
Send
for
Shader
source
§
impl
Sync
for
Shader