Flutter Engine
The Flutter Engine
RadialGradient.java
Go to the documentation of this file.
1/*
2 * Copyright 2021 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8package org.skia.jetski;
9
10import androidx.annotation.Nullable;
11import java.lang.IllegalArgumentException;
12
13public class RadialGradient extends Gradient {
14 public RadialGradient(float x, float y, float r, int[] colors, float[] pos, TileMode tm,
15 @Nullable Matrix localMatrix) throws IllegalArgumentException {
16 super(colors, pos, tm, localMatrix,
17 (c, p, t, m) -> nMakeRadial(x, y, r, c, p, t, m));
18 }
19
20 public RadialGradient(float x, float y, float r, int[] colors,
21 float[] pos, TileMode tm) throws IllegalArgumentException {
22 this(x, y, r, colors, pos, tm, null);
23 }
24
25 public RadialGradient(float x, float y, float r, float[] colors, float[] pos, TileMode tm,
26 @Nullable Matrix localMatrix) throws IllegalArgumentException {
27 super(colors, pos, tm, localMatrix,
28 (c, p, t, m) -> nMakeRadial(x, y, r, c, p, t, m));
29 }
30
31 public RadialGradient(float x, float y, float r, float[] colors,
32 float[] pos, TileMode tm) throws IllegalArgumentException {
33 this(x, y, r, colors, pos, tm, null);
34 }
35
36 private static native long nMakeRadial(float x, float y, float r, float[] colors, float[] pos,
37 int tilemode, long nativeLocalMatrix);
38}
SkPoint pos
RadialGradient(float x, float y, float r, float[] colors, float[] pos, TileMode tm, @Nullable Matrix localMatrix)
RadialGradient(float x, float y, float r, float[] colors, float[] pos, TileMode tm)
RadialGradient(float x, float y, float r, int[] colors, float[] pos, TileMode tm)
RadialGradient(float x, float y, float r, int[] colors, float[] pos, TileMode tm, @Nullable Matrix localMatrix)
double y
double x
PODArray< SkColor > colors
Definition: SkRecords.h:276