Flutter Engine
The Flutter Engine
SweepGradient.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 SweepGradient extends Gradient {
14 public SweepGradient(float x, float y, float startAngle, float endAngle,
15 int[] colors, float[] pos, TileMode tm,
16 @Nullable Matrix localMatrix) throws IllegalArgumentException {
17 super(colors, pos, tm, localMatrix,
18 (c, p, t, m) -> nMakeSweep(x, y, startAngle, endAngle, c, p, t, m));
19 }
20
21 public SweepGradient(float x, float y, float startAngle, float endAngle,
22 int[] colors, float[] pos, TileMode tm) throws IllegalArgumentException {
23 this(x, y, startAngle, endAngle, colors, pos, tm, null);
24 }
25
26 public SweepGradient(float x, float y, int[] colors,
27 float[] pos) throws IllegalArgumentException {
28 this(x, y, 0, 360, colors, pos, TileMode.CLAMP, null);
29 }
30
31 public SweepGradient(float x, float y, float startAngle, float endAngle,
32 float[] colors, float[] pos, TileMode tm,
33 @Nullable Matrix localMatrix) throws IllegalArgumentException {
34 super(colors, pos, tm, localMatrix,
35 (c, p, t, m) -> nMakeSweep(x, y, startAngle, endAngle, c, p, t, m));
36 }
37
38 public SweepGradient(float x, float y, float startAngle, float endAngle,
39 float[] colors, float[] pos, TileMode tm) throws IllegalArgumentException {
40 this(x, y, startAngle, endAngle, colors, pos, tm, null);
41 }
42
43 public SweepGradient(float x, float y, float[] colors,
44 float[] pos) throws IllegalArgumentException {
45 this(x, y, 0, 360, colors, pos, TileMode.CLAMP, null);
46 }
47
48 private static native long nMakeSweep(float x, float y, float sa, float ea,
49 float[] colors, float[] pos,
50 int tilemode, long nativeLocalMatrix);
51}
SkPoint pos
SweepGradient(float x, float y, float startAngle, float endAngle, float[] colors, float[] pos, TileMode tm, @Nullable Matrix localMatrix)
SweepGradient(float x, float y, float startAngle, float endAngle, float[] colors, float[] pos, TileMode tm)
SweepGradient(float x, float y, float startAngle, float endAngle, int[] colors, float[] pos, TileMode tm, @Nullable Matrix localMatrix)
SweepGradient(float x, float y, int[] colors, float[] pos)
SweepGradient(float x, float y, float startAngle, float endAngle, int[] colors, float[] pos, TileMode tm)
SweepGradient(float x, float y, float[] colors, float[] pos)
double y
double x
SkScalar startAngle
Definition: SkRecords.h:250
PODArray< SkColor > colors
Definition: SkRecords.h:276