private void chain_draw(DrawCellFunc <TGraphics> next, int col, int row, double x, double y, double width, double height, TGraphics gr) { TImage img; if (!_cache.find(col, row, out img)) { img = draw(next, col, row, width, height, gr); _cache.add(col, row, img); } draw_image(gr, img, x, y); }
private static void chain_draw(DrawCellFunc <TGraphics> next, Padding?pad, int col, int row, double x, double y, double width, double height, TGraphics gr) { if (pad.HasValue) { Padding t = pad.Value; next( col, row, x + t.Left, y + t.Top, width - (t.Left + t.Right), height - (t.Top + t.Bottom), gr ); } else { next(col, row, x, y, width, height, gr); } }
protected override IImage draw(DrawCellFunc <IGraphics> next, int col, int row, double width, double height, IGraphics gr) { gr.BeginOffscreen((float)width, (float)height, null); next(col, row, 0, 0, width, height, gr); return(gr.EndOffscreen()); }
protected abstract TImage draw(DrawCellFunc <TGraphics> next, int col, int row, double width, double height, TGraphics gr);