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); }
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); }
public override void RemoveFromPainter() { player.Stop(); player = null; base.RemoveFromPainter(); }
public MovieElement(UIScreen screen, BinElement el, byte[] palette, SmackerPlayer player) : base(screen, el, palette) { Player = player; }
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; }
public MovieElement (UIScreen screen, BinElement el, byte[] palette, SmackerPlayer player) : base (screen, el, palette) { Player = player; }
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; }
public override void RemoveFromPainter () { player.Stop (); player = null; base.RemoveFromPainter (); }