public void draw(int boundWidth, int boundHeight, Rectangle[] rects, ref Draw rectdraw, Graphics drawG) { Bitmap bitmap = new Bitmap(boundWidth, boundHeight); Graphics graphics2 = Graphics.FromImage(bitmap); for (int i = 0; i < subControlNum; i++) { toDraw(rects[i], ref rectdraw, graphics2); } drawG.DrawImage(bitmap, 0, 0); }
public void draw(string[] name,Font[] font,Size boundSize, Rectangle[][] rects, ref Draw[] rectdraw, Graphics drawG) { Bitmap bitmap = new Bitmap(boundSize.Width, boundSize.Height); Graphics graphics2 = Graphics.FromImage(bitmap); for (int i = 0; i < subControlNum; i++) { rectdraw[0].draw(rects[0][i], drawG); // name[i] = string.Format("{0:D3}", i + 1); // rectdraw[1].draw(name[i],font[1],rects[1][i], drawG); } drawG.DrawImage(bitmap, 0, 0); }
private void grid_Paint(object sender, PaintEventArgs e) { Font[] fonts = new Font[1]; Rectangle[][] rectsArray = new Rectangle[1][]; Draw[] drawArray = new Draw[1]; drawArray[0] = draw; // drawArray[1] = draw1; rectsArray[0] = scaleButton.Regs; //rectsArray[1] = scaleStringButton.Regs; fonts[0] = this.font; // fonts[1] = font; draws.draw(name, fonts, this.ClientSize, rectsArray, ref drawArray, e.Graphics); }
public virtual void toDraw(Rectangle rect, ref Draw rectdraw, Graphics drawG) { }
public void draw(Size boundSize, Rectangle[] rects, ref Draw rectdraw, Graphics drawG) { draw(boundSize.Width, boundSize.Height, rects, ref rectdraw, drawG); }
public override void toDraw(Rectangle rect, ref /*DrawRectButton*/Draw rectdraw, Graphics drawG) { rectdraw.draw(rect, drawG); }