Пример #1
0
 public CustomNativeGraphicsView(Context context, IDrawable drawable = null) : base(context)
 {
     _scale         = Resources.DisplayMetrics.Density;
     _canvas        = new NativeCanvas(context);
     _scalingCanvas = new ScalingCanvas(_canvas);
     Drawable       = drawable;
 }
Пример #2
0
 protected override void OnClosing(CancelEventArgs e)
 {
     //close native windows
     if (nativeCanvas != null)
     {
         nativeCanvas.Dispose();
         nativeCanvas = null;
     }
     base.OnClosing(e);
 }
Пример #3
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            NativePixelLibInterOp.LoadLib();

            nativeCanvas = NativeCanvas.CreateNativeCanvas(this.Handle, 800, 600);
            Bitmap bmp = new Bitmap("res_fish.bmp");

            nativeBmp = NativeBmp.CreateNativeWrapper(bmp);
            isReady   = true;
        }
Пример #4
0
		internal Canvas(NativeCanvas native)
		{
			mNativeCanvas = native;
			mDensity = android.util.DisplayMetrics.DENSITY_DEFAULT;
		}
Пример #5
0
 internal Canvas(NativeCanvas native)
 {
     mNativeCanvas = native;
     mDensity      = android.util.DisplayMetrics.DENSITY_DEFAULT;
 }