Hi, I’m trying to use skiaGraphics on linux as background.
See this post for more explanation on skia : skia Discussion
In my code, I must choose : even skia works and PGraphics not or vice versa.
import micycle.processingSkia.SkiaCanvas;
import org.jetbrains.skija.*;
PGraphics pg;
Canvas skiaCanvas;
Rect rect;
void settings() {
size(1024, 768, P2D);
}
void setup() {
skiaCanvas = SkiaCanvas.getSkiaCanvas(this);
rect = new Rect(0, 0, width, height);
pg = createGraphics(width, height, P2D);
}
void draw() {
Paint fill = new Paint().setShader(Shader.makeLinearGradient(77, 184, -11, 539, new int[] {0xffffa527, 0xFF4CA387}));
skiaCanvas.drawRect(rect, fill);
pg.beginDraw();
pg.fill(20, 220, 200);
pg.ellipse(200, 200, 220, 300);
pg.endDraw();
image(pg, 0, 0);
}
There is way to work around ?
Thanks for help