public override void Draw(CGRect rect) { if (!LiteHtmlContainer.Document.HasRendered) { return; } using (CGContext gfxc = UIGraphics.GetCurrentContext()) { gfxc.SaveState(); gfxc.TranslateCTM(Viewport.X, Viewport.Y); CheckViewportChange(); LiteHtmlContainer.Context = gfxc; LiteHtmlContainer.Draw(); LiteHtmlContainer.Context = null; gfxc.RestoreState(); if (Drawn != null) { Drawn(); } } }
public override void DrawRect(CGRect dirtyRect) { if (!LiteHtmlContainer.Document.HasRendered) { return; } var gfxc = NSGraphicsContext.CurrentContext.GraphicsPort; gfxc.SaveState(); var point = ViewportPoint; gfxc.TranslateCTM(point.X, point.Y); LiteHtmlContainer.CheckViewportChange(); LiteHtmlContainer.Context = gfxc; LiteHtmlContainer.Draw(); LiteHtmlContainer.Context = null; gfxc.RestoreState(); if (Drawn != null) { Drawn(); } }