add support for custom Java Drawables

This is made possible, by adding a second Canvas implementation which
can be used to render directly to GdkSnapshot objects

For now the only implemented method is drawBitmap(), this is already
enough to make VectorDrawableCompat functional
This commit is contained in:
Julian Winkler
2024-03-24 21:01:47 +01:00
parent 0b78cbcc55
commit ad266c7821
15 changed files with 182 additions and 30 deletions

View File

@@ -1,6 +1,5 @@
package android.graphics.drawable;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.shapes.Shape;
@@ -9,11 +8,5 @@ public class ShapeDrawable extends Drawable {
public ShapeDrawable(Shape shape) {}
public Paint getPaint() {return new Paint();}
@Override
public void draw(Canvas canvas) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'draw'");
}
}