void DrawPositionFrame(ConcurrentGifsCommand.Frame frame, Graphics gfx) { gfx.DrawImage(frame.Image, new Rectangle( _animagedGifTemplateLocation.X, _animagedGifTemplateLocation.Y + VerticalOffset, _animagedGifTemplateLocation.Width, _animagedGifTemplateLocation.Height)); }
public override void DrawFrame(ConcurrentGifsCommand.Frame frame, Graphics gfx) { if (frame.Start >= _startTime) { gfx.DrawString(_text, new Font(FontFamily.GenericSansSerif, 12), new SolidBrush(Color.Black), new RectangleF(24, VerticalOffset + 60, 305, 110)); } base.DrawFrame(frame, gfx); }
public override void DrawFrame(ConcurrentGifsCommand.Frame currentFrame, Graphics gfx) { if (currentFrame.Start < _startTime) { return; } var newBackground = Image.FromStream(this.GetType().Assembly.GetManifestResourceStream( "Gifenstein.Resources.AllRightGentlemen_impressed.png")); gfx.DrawImageUnscaledAndClipped(newBackground, new Rectangle(0, VerticalOffset, newBackground.Width, newBackground.Height)); base.DrawFrame(currentFrame, gfx); }
public override void DrawFrame(ConcurrentGifsCommand.Frame currentFrame, Graphics gfx) { if (_frames.Contains(currentFrame)) { DrawPositionFrame(currentFrame, gfx); } else { var widgetStart = _frames.First().Start; var widgetDuration = _frames.Last().End - widgetStart; if (currentFrame.Start > widgetStart) { var relativePosition = (currentFrame.Start - widgetStart) % widgetDuration; var relativeFrame = _frames.Where(f => f.Start <= widgetStart + relativePosition).LastOrDefault(); DrawFrame(relativeFrame, gfx); } } }
public virtual void DrawFrame(ConcurrentGifsCommand.Frame frame, Graphics gfx) { }