|
| RuntimeSample (Resources res, int resId) |
|
void | render (Canvas canvas, long ms, float left, float top, float right, float bottom) |
|
void | render (Canvas canvas, long t, float left, float top, float right, float bottom) |
|
Definition at line 19 of file RuntimeSample.java.
◆ RuntimeSample()
org.skia.jetskidemo.samples.RuntimeSample.RuntimeSample |
( |
Resources |
res, |
|
|
int |
resId |
|
) |
| |
|
inline |
Definition at line 22 of file RuntimeSample.java.
22 {
23 String sksl = "";
24 try {
25 InputStream is = res.openRawResource(resId);
26 byte[]
data =
new byte[is.available()];
28
29 sksl =
new String(
data);
30 }
catch (Exception
e) {}
31
32 mShaderBuilder = new RuntimeShaderBuilder(sksl);
33 }
std::shared_ptr< const fml::Mapping > data
◆ render()
void org.skia.jetskidemo.samples.RuntimeSample.render |
( |
Canvas |
canvas, |
|
|
long |
t, |
|
|
float |
left, |
|
|
float |
top, |
|
|
float |
right, |
|
|
float |
bottom |
|
) |
| |
|
inline |
Renders a Sample frame t (ms) into the destination rect [L T R B].
Implements org.skia.jetskidemo.samples.Sample.
Definition at line 35 of file RuntimeSample.java.
35 {
39
41
42 canvas.save();
43 canvas.concat(
new Matrix().translate(left, top));
44 canvas.drawRect(0, 0, right - left, bottom - top,
paint);
45 canvas.restore();
46 }
RuntimeShaderBuilder setUniform(String name, float val)
SK_API sk_sp< PrecompileColorFilter > Matrix()
The documentation for this class was generated from the following file:
- third_party/skia/platform_tools/android/apps/jetskidemo/src/main/java/org/skia/jetskidemo/samples/RuntimeSample.java