Пример #1
0
        public override bool Start(IMouseInformation mouseInformation)
        {
            if (!Enabled)
            {
                return(false);
            }

            base.Start(mouseInformation);

            if (_graphicBuilder != null)
            {
                return(_graphicBuilder.Start(mouseInformation));
            }

            IDicomPresentationImage image = mouseInformation.Tile.PresentationImage as IDicomPresentationImage;

            if (image == null || GetGeometricShuttersGraphic(image, true) == null)
            {
                return(false);
            }

            AddDrawShutterGraphic(image);

            if (_graphicBuilder.Start(mouseInformation))
            {
                _primitiveGraphic.Draw();
                return(true);
            }

            this.Cancel();
            return(false);
        }
        static IntPtr n_Draw_Landroid_graphics_Canvas_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
        {
            IGraphic __this = Java.Lang.Object.GetObject <IGraphic> (native__this, JniHandleOwnership.DoNotTransfer);

            global::Android.Graphics.Canvas p0 = Java.Lang.Object.GetObject <global::Android.Graphics.Canvas> (native_p0, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.Draw(p0));

            return(__ret);
        }
Пример #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("############ Draw a Graphic ##########");
            Console.WriteLine(">>>>>>>>>>>> IGraphic can draw a Circle");
            var      circle  = new Circle(5, 5, 5);
            IGraphic graphic = circle;

            graphic.Draw();

            Console.WriteLine(">>>>>>>>>>>> IGraphic can draw a lot of graphics ");
            Console.WriteLine("Create a compound graphic ");
            var compoundGraphic = new CompoundGraphic();

            compoundGraphic.Add(circle);
            compoundGraphic.Add(new Dot(3, 3));
            Console.WriteLine("Start Drawing");
            graphic = compoundGraphic;
            graphic.Draw();
        }