public NativeBitmapExportContext(int width, int height, float displayScale = 1, int dpi = 72, bool disposeBitmap = true, bool transparent = true) : base(width, height, dpi) { _bitmap = Bitmap.CreateBitmap( width, height, transparent ? Bitmap.Config.Argb8888 : Bitmap.Config.Rgb565); _androidCanvas = new Canvas(_bitmap); var nativeCanvas = new NativeCanvas(null) { Canvas = _androidCanvas, }; _canvas = new ScalingCanvas(nativeCanvas) { DisplayScale = displayScale }; _disposeBitmap = disposeBitmap; }
public DirectRenderer(Context context) { _canvas = new NativeCanvas(context); _scalingCanvas = new ScalingCanvas(_canvas); }