Example #1
0
        public override void Initialize()
        {
            PClip clip = new PClip();
            clip.Brush = new SolidBrush(Color.Yellow);
            clip.SetBounds(0, 0, 100, 100);

            PEllipse red = new PEllipse();
            red.Bounds = new RectangleF(20, 20, 110, 50);
            red.Brush = new SolidBrush(Color.Red);
            clip.AddChild(red);

            Canvas.Layer.AddChild(clip);

            Canvas.ZoomEventHandler = null;
            Canvas.Camera.AddInputEventListener(new PDragEventHandler());

            base.Initialize ();
        }
Example #2
0
        public override void Initialize()
        {
            PNode blue = new PNode();
            blue.SetBounds(0, 0, 60, 80);
            blue.Brush = new SolidBrush(Color.Blue);
            Canvas.Layer.AddChild(blue);

            PEllipse red = new PEllipse();
            red.SetBounds(50, 30, 60, 45);
            red.Brush = new SolidBrush(Color.Red);
            Canvas.Layer.AddChild(red);

            Bitmap bm = new Bitmap(GetType().Module.Assembly.GetManifestResourceStream("PocketPiccoloFeatures.hcil.bmp"));
            PImage image = new PImage(bm);
            image.SetBounds(80, 100, image.Width, image.Height);
            Canvas.Layer.AddChild(image);

            Canvas.ZoomEventHandler = null;
            Canvas.AddInputEventListener(new PDragEventHandler());

            base.Initialize ();
        }
Example #3
0
        public override void Initialize()
        {
            PLayer l = new PLayer();
            PEllipse n = new PEllipse();
            n.SetBounds(0, 0, 100, 80);
            n.Brush = new SolidBrush(Color.Red);
            PBoundsHandle.AddBoundsHandlesTo(n);
            l.AddChild(n);
            n.TranslateBy(100, 100);

            PCamera c = new PCamera();
            c.SetBounds(0, 0, 100, 80);
            c.ScaleViewBy(0.1f);
            c.AddLayer(l);
            PBoundsHandle.AddBoundsHandlesTo(c);
            c.Brush = new SolidBrush(Color.Yellow);

            Canvas.Layer.AddChild(l);
            Canvas.Layer.AddChild(c);

            base.Initialize ();
        }