private void RenderContainer(PaintEventArgs e, AnnWinFormsRenderingEngine engine, AnnContainer container) { // Attach to the current container and graphics. Graphics graphics = e.Graphics; Rectangle clipRectangle = e.ClipRectangle; try { engine.Attach(container, graphics); // Render the annotatirons LeadRectD rc = LeadRectD.Create(clipRectangle.X, clipRectangle.Y, clipRectangle.Width, clipRectangle.Height); rc = container.Mapper.RectToContainerCoordinates(rc); engine.Render(rc, true); } finally { engine.Detach(); } }
private static void RenderContainer(PaintEventArgs e, AnnWinFormsRenderingEngine engine, AnnContainer container, bool runMode) { // Attach to the current container and graphics. var context = e.Graphics; var clipRectangle = e.ClipRectangle; engine.Attach(container, context); try { // Render the annotatirons var rc = LeadRectD.Create(clipRectangle.X, clipRectangle.Y, clipRectangle.Width, clipRectangle.Height); rc = container.Mapper.RectToContainerCoordinates(rc); engine.Render(rc, runMode); } finally { engine.Detach(); } }