예제 #1
0
        public override void KeyDown(int keycode)
        {
            //temp
            System.Windows.Forms.Keys k = (System.Windows.Forms.Keys)keycode;
            switch (k)
            {
            case System.Windows.Forms.Keys.A:
            {
                SpriteShape s = new SpriteShape(SvgRenderVxLoader.CreateSvgRenderVxFromFile(@"Samples\arrow2.svg"));
                lionList.Add(new MyTestSprite(s)
                    {
                        JustMove = true
                    });
            }
            break;

            case System.Windows.Forms.Keys.Q:
            {
                //test add box control ...
            }
            break;
            }


            base.KeyDown(keycode);
        }
예제 #2
0
        public override void Init()
        {
            // lion
            SpriteShape s = new SpriteShape(SvgRenderVxLoader.CreateSvgRenderVxFromFile(@"Samples\arrow2.svg"));

            lionList.Add(new MyTestSprite(s));
            //
            //lionFill.AutoFlipY = true;
        }
예제 #3
0
        protected override void OnReadyForInitGLShaderProgram()
        {
            SvgRenderVx svgRenderVx = SvgRenderVxLoader.CreateSvgRenderVxFromFile("d:\\WImageTest\\lion.svg");

            lionShape = new SpriteShape(svgRenderVx);


            //flip this lion vertically before use with openGL
            PixelFarm.Agg.Transform.Affine aff = PixelFarm.Agg.Transform.Affine.NewMatix(
                PixelFarm.Agg.Transform.AffinePlan.Scale(1, -1),
                PixelFarm.Agg.Transform.AffinePlan.Translate(0, 600));
            lionShape.ApplyTransform(aff);
        }
예제 #4
0
        public perspective_application()
        {
            lionShape = new SpriteShape(SvgRenderVxLoader.CreateSvgRenderVxFromFile(@"Samples\lion.svg"));

            quadPolygonControl = new PixelFarm.Agg.UI.PolygonEditWidget(4, 5.0);
            quadPolygonControl.SetXN(0, lionShape.Bounds.Left);
            quadPolygonControl.SetYN(0, lionShape.Bounds.Top);
            quadPolygonControl.SetXN(1, lionShape.Bounds.Right);
            quadPolygonControl.SetYN(1, lionShape.Bounds.Top);
            quadPolygonControl.SetXN(2, lionShape.Bounds.Right);
            quadPolygonControl.SetYN(2, lionShape.Bounds.Bottom);
            quadPolygonControl.SetXN(3, lionShape.Bounds.Left);
            quadPolygonControl.SetYN(3, lionShape.Bounds.Bottom);
        }
예제 #5
0
        public alpha_mask2_application()
        {
            lionShape   = new SpriteShape(SvgRenderVxLoader.CreateSvgRenderVxFromFile("Samples\arrow2.svg"));
            this.Width  = 800;
            this.Height = 600;
            //AnchorAll();
            //alphaMaskImageBuffer = new ReferenceImage();

#if USE_CLIPPING_ALPHA_MASK
            //alphaMask = new AlphaMaskByteClipped(alphaMaskImageBuffer, 1, 0);
#else
            //alphaMask = new AlphaMaskByteUnclipped(alphaMaskImageBuffer, 1, 0);
#endif

            //numMasksSlider = new UI.Slider(5, 5, 150, 12);
            //sliderValue = 0.0;
            //AddChild(numMasksSlider);
            //numMasksSlider.SetRange(5, 100);
            //numMasksSlider.Value = 10;
            //numMasksSlider.Text = "N={0:F3}";
            //numMasksSlider.OriginRelativeParent = Vector2.Zero;
        }
예제 #6
0
 public override void Init()
 {
     lionFill = new MyTestSprite(new SpriteShape(SvgRenderVxLoader.CreateSvgRenderVxFromFile(@"Samples\lion.svg")));
     //lionFill.AutoFlipY = true;
 }
예제 #7
0
 public MyLionSpriteTool()
 {
     lionFill = new MyTestSprite(new SpriteShape(SvgRenderVxLoader.CreateSvgRenderVxFromFile(@"Samples\arrow2.svg")));
 }
예제 #8
0
 //special option
 public LionOutlineSprite()
 {
     lionShape   = new SpriteShape(SvgRenderVxLoader.CreateSvgRenderVxFromFile(@"Samples\lion.svg"));
     this.Width  = 500;
     this.Height = 500;
 }