public override void Initialize()
        {
            PNode blue = new PNode();

            blue.SetBounds(0, 0, 60, 80);
            blue.Brush = new SolidBrush(Color.Blue);
            Canvas.Layer.AddChild(blue);

            PNode 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 PPanEventHandler());

            base.Initialize();
        }
Example #2
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();
        }