public Flag(string name, string path, FlagPainter painter) { _name = name; _path = path; _painter = painter; }
private void Draw() { FlagPainter flagP = new FlagPainter(); Bitmap flagBm = new Bitmap(pbFlag.Width, pbFlag.Height); using (Graphics g = Graphics.FromImage((Image)flagBm)) g.DrawImage(flagP.Draw(flag), 0, 0, flagBm.Width, flagBm.Height); pbFlag.Image = flagBm; }