Esempio n. 1
0
        public override void AddToPainter()
        {
            base.AddToPainter();

            player = new SmackerPlayer((Stream)mpq.GetResource(resourcePath));

            player.Finished += PlayerFinished;

            movieElement.Player = player;

            movieElement.Play();

            if (player.Width != 640 ||         /*Painter.Width*/
                player.Height != 480 /*Painter.Height*/)
            {
                float horiz_zoom = (float)640 /*Painter.Width*/ / player.Width;
                float vert_zoom  = (float)480 /*Painter.Height*/ / player.Height;
                float zoom;

                if (horiz_zoom < vert_zoom)
                {
                    zoom = horiz_zoom;
                }
                else
                {
                    zoom = vert_zoom;
                }

                AffineTransform = CGAffineTransform.MakeScale(zoom, zoom);
            }

            movieElement.Layer.AnchorPoint = new PointF(0, 0);
            AddSublayer(movieElement.Layer);
        }
Esempio n. 2
0
		public override void AddToPainter ()
		{
			base.AddToPainter ();

			player = new SmackerPlayer ((Stream)mpq.GetResource (resourcePath));
			
			player.Finished += PlayerFinished;
			
			movieElement.Player = player;
			
			movieElement.Play ();

			if (player.Width != 640/*Painter.Width*/
		    	|| player.Height != 480/*Painter.Height*/) {

				float horiz_zoom = (float)640/*Painter.Width*/ / player.Width;
				float vert_zoom = (float)480/*Painter.Height*/ / player.Height;
				float zoom;

				if (horiz_zoom < vert_zoom)
					zoom = horiz_zoom;
				else
					zoom = vert_zoom;
				
				AffineTransform = CGAffineTransform.MakeScale (zoom, zoom);
			}

			movieElement.Layer.AnchorPoint = new PointF (0, 0);
			AddSublayer (movieElement.Layer);
		}
Esempio n. 3
0
        public override void RemoveFromPainter()
        {
            player.Stop();
            player = null;

            base.RemoveFromPainter();
        }
Esempio n. 4
0
 public MovieElement(UIScreen screen, BinElement el, byte[] palette, SmackerPlayer player)
     : base(screen, el, palette)
 {
     Player = player;
 }
Esempio n. 5
0
 public MovieElement(UIScreen screen, BinElement el, byte[] palette, string resource)
     : base(screen, el, palette)
 {
     Player             = new SmackerPlayer((Stream)Mpq.GetResource(resource), 1);
     Player.FrameReady += NewFrame;
 }
Esempio n. 6
0
		public MovieElement (UIScreen screen, BinElement el, byte[] palette, SmackerPlayer player)
			: base (screen, el, palette)
		{
			Player = player;
		}
Esempio n. 7
0
		public MovieElement (UIScreen screen, BinElement el, byte[] palette, string resource)
			: base (screen, el, palette)
		{
			Player = new SmackerPlayer ((Stream)Mpq.GetResource (resource), 1);
			Player.FrameReady += NewFrame;
		}
Esempio n. 8
0
		public override void RemoveFromPainter ()
		{
			player.Stop ();
			player = null;

			base.RemoveFromPainter ();
		}