public DrawImageUnscaled ( Image image, Point point ) : void | ||
image | Image | |
point | Point | |
return | void |
public static void DrawBackgroundStyle(Graphics g, Point location, Size size, Background background) { // draw background color g.FillRectangle( new SolidBrush(System.Drawing.Color.FromKnownColor(background.Color)), location.X, location.Y, size.Width, size.Height); // draw background image if (background.Image != null) { Image bg = background.Image; // Image.FromFile(this.Background.Image); switch (background.Repeat) { case BackgroundRepeat.Undefined: case BackgroundRepeat.Tile: for (int i = 0; i < size.Width / bg.Width; i++) for (int j = 0; j < size.Height / bg.Height; j++) g.DrawImageUnscaled(bg, location.X + i * bg.Width, location.Y + j * bg.Height); break; case BackgroundRepeat.Strech: g.DrawImage(bg, location.X, location.Y, size.Width, size.Height); break; case BackgroundRepeat.Center: int posX = location.X + size.Width / 2 - bg.Width / 2; int posY = location.Y + size.Height / 2 - bg.Height / 2; g.DrawImageUnscaled(bg, posX, posY); break; default: break; } } }
public void Draw(int i, int j, Graphics g) { if (this.Orientation == 1) triImage = Properties.Resources.t1; if (this.Orientation == 2) triImage = Properties.Resources.t2; if (this.Orientation == 3) triImage = Properties.Resources.t3; if (this.Orientation == 4) triImage = Properties.Resources.t4; if (this.Orientation == 5) triImage = Properties.Resources.yellow; if (this.Orientation == 6) triImage = Properties.Resources.red; if (this.Orientation == 0) triImage = Properties.Resources.cleared; if (triImage != null) { if (this.Orientation != 0) g.DrawImageUnscaled(Properties.Resources.cleared, new Point(8 + 17 * i + i * triImage.Width, 6 + 17 * j + j * triImage.Height)); g.DrawImageUnscaled(triImage, new Point(8 + 17 * i + i * triImage.Width, 6 + 17 * j + j * triImage.Height)); } }
public void Draw(Graphics e) { kolizija = new Bitmap(ozadje); e.Clear(Color.Black); e.DrawImageUnscaled(ozadje, 0, 0); e.DrawImageUnscaled(igralci, 0, 0); }
public override void OnRender(Graphics g) { #if !PocketPC if(!Bearing.HasValue) { g.DrawImageUnscaled(Resources.shadow50, LocalPosition.X, LocalPosition.Y); } g.TranslateTransform(ToolTipPosition.X, ToolTipPosition.Y); if(Bearing.HasValue) { g.RotateTransform(Bearing.Value - Overlay.Control.Bearing); g.FillPolygon(Brushes.Lime, Arrow); } g.ResetTransform(); if(!Bearing.HasValue) { g.DrawImageUnscaled(Resources.bigMarkerGreen, LocalPosition.X, LocalPosition.Y); } #else DrawImageUnscaled(g, Resources.shadow50, LocalPosition.X, LocalPosition.Y); DrawImageUnscaled(g, Resources.marker, LocalPosition.X, LocalPosition.Y); #endif }
public override void OnRender(Graphics g) { if (shotBellowMinInterval) g.DrawImageUnscaled(localcache2, LocalPosition.X, LocalPosition.Y); else g.DrawImageUnscaled(localcache1, LocalPosition.X, LocalPosition.Y); if (drawfootprint || IsMouseOver) { Overlay.Control.UpdatePolygonLocalPosition(footprintpoly); footprintpoly.OnRender(g); } }
/// <summary> /// Shows houses or hotels. /// </summary> public override void ShowHouses(Graphics g, int numberOfHouses) { if(numberOfHouses == 5) { g.DrawImageUnscaled(HotelVertical, Left, Top + 6); } else if(numberOfHouses >= 1 && numberOfHouses <= 4) { for (int i = 0; i < numberOfHouses; ++i) { g.DrawImageUnscaled(HouseVertical, Left, Bottom - i * 10 - 13); } } }
/* * @param graphics */ public override void draw(Graphics graphics) { if (turnRight) { // this is just a sample draw routine. It needs to be overrided by the child object Bitmap bitmap = elements[((int)getTicks() * speed % (360 / TURN_ANGLE))]; graphics.DrawImageUnscaled(bitmap, getX(), getY(), bitmap.Width, bitmap.Height); } else { // this is just a sample draw routine. It needs to be overrided by the child object Bitmap bitmap = elements[((360 / TURN_ANGLE) - ((int)getTicks() * speed % (360 / TURN_ANGLE)) - 1)]; graphics.DrawImageUnscaled(bitmap, getX(), getY(), bitmap.Width, bitmap.Height); } }
public override void Render(Graphics graphics, IRender render) { byte opacity = 100; if (Table != null) opacity = Table.Opacity; //Draw indent SolidBrush brush = new SolidBrush(render.AdjustColor(Backcolor,1,opacity)); brush.Color = Color.FromArgb(brush.Color.A /2, brush.Color); graphics.FillRectangle(brush,0,Rectangle.Top,Indent,Rectangle.Height); //Draw image float imageWidth = 0; if (Image != null) { System.Drawing.Image bitmap = Image.Bitmap; //Work out position of image float imageTop = (Rectangle.Height - bitmap.Height) / 2; if (imageTop < 0) imageTop = 0; imageWidth = bitmap.Width; graphics.DrawImageUnscaled(bitmap,Convert.ToInt32(Indent),Convert.ToInt32(Rectangle.Top+imageTop)); } //Draw text RectangleF textRectangle = new RectangleF(Indent+imageWidth+4,Rectangle.Top,Rectangle.Width - Indent -4,Rectangle.Height); brush = new SolidBrush(render.AdjustColor(Forecolor,1,opacity)); StringFormat format = new StringFormat(); format.LineAlignment = StringAlignment.Center; format.FormatFlags = StringFormatFlags.NoWrap; graphics.DrawString(Text,Component.Instance.GetFont(FontName,FontSize,FontStyle),brush,textRectangle,format); }
internal void RefreshInRect(Graphics eg, Rectangle rect) { if (!gbRefresh) return; Random rnd = new Random(); if (rect.Width <= 0 || rect.Height <= 0) return; //using (Graphics eg = base.CreateGraphics()) { using (Bitmap Bmp = new Bitmap(rect.Width, rect.Height)) { using (Graphics g = Graphics.FromImage(Bmp)) { g.Clear(Color.White); //发送绘制消息 PaintMessage m = new PaintMessage(g, rect); gManager.SendMessage(m); } if (eg != null) { eg.DrawImageUnscaled(Bmp, rect.X, rect.Y); } else { try { using (Graphics g = this.CreateGraphics()) { g.DrawImageUnscaled(Bmp, rect.X, rect.Y); //System.Diagnostics.Debug.WriteLine("GPanel\\>RefreshInRect" + rect.ToString()); } } catch { } } } }
public void Draw(Graphics g, int animationCell, bool gameOver) { g.FillRectangle(Brushes.Black, boundaries); stars.Draw(g); playerShip.Draw(g); foreach (Invader invader in invaders) invader.Draw(g, animationCell); foreach (Shot shot in playerShots) shot.Draw(g); foreach (Shot shot in invaderShots) shot.Draw(g); using (Font font = new Font("Arial", 24, FontStyle.Bold)) g.DrawString(score.ToString(), font, Brushes.Red, boundaries.X + 20, boundaries.Y + 20); g.DrawImageUnscaled(Properties.Resources.player, new Point(boundaries.Right - 110, boundaries.Top + 10)); using (Font font = new Font("Arial", 20)) g.DrawString("X " + livesLeft, font, Brushes.Yellow, boundaries.Right - 50, boundaries.Top + 10); if (gameOver) { using (Font font = new Font("Arial", 40)) g.DrawString("Game Over", font, Brushes.Purple, (boundaries.Width / 3), boundaries.Height / 3); using (Font font = new Font("Arial", 20)) g.DrawString("Press 'Q' to quit\nor 'S' to restart", font, Brushes.Purple, boundaries.Width / 3 + 45, boundaries.Height / 3 + 50); } }
public void DrawBitmapInto(Graphics g, Point TLPoint, Size ViewPortSize, int squareS, bool isBichrom, bool forcePrecomputing = false) { // squareSize has changed OR no map has been loaded so far if (cachedBitmap == null || squareSize != squareS || cachedBitmapTLPoint.X > TLPoint.X || cachedBitmapTLPoint.Y > TLPoint.Y || (cachedBitmapTLPoint.X + cachedBitmap.Width < getMapPixelSize().Width && cachedBitmapTLPoint.X + cachedBitmap.Width < TLPoint.X + ViewPortSize.Width) || (cachedBitmapTLPoint.Y + cachedBitmap.Height < getMapPixelSize().Height && cachedBitmapTLPoint.Y + cachedBitmap.Height < TLPoint.Y + ViewPortSize.Height) || isBichrom != isBichromatic || forcePrecomputing ) { //System.Windows.Forms.MessageBox.Show("cachedBitmap == null"); squareSize = squareS; isBichromatic = isBichrom; PrecomputeBitmap(TLPoint, ViewPortSize); } // Draw it on the buffered bitmap bufferedBitmapGraphics.Clear(Color.White); Point relativeTLPoint = new Point(cachedBitmapTLPoint.X - TLPoint.X, cachedBitmapTLPoint.Y - TLPoint.Y); Rectangle rect = new Rectangle(relativeTLPoint, ViewPortSize); bufferedBitmapGraphics.DrawImageUnscaled(cachedBitmap, rect); g.DrawImageUnscaled(bufferedBitmap, 0, 0); }
public void DrawString(string text, Graphics graphics, int x, int y, int? maxWidth = null, int extraGap = 0) { int lineGap = baseLineGap + extraGap; foreach (char ch in text) { if (ch == '\r') continue; // If a new line char, go to next line. if (ch == '\n') { x = 0; y += lineGap; continue; } // Get glyph, if not found, take the deafault char. var glyph = font.SearchGlyphByChar(ch) ?? defaultChar; // If we are over the max width, go to next line. if (maxWidth.HasValue && x + glyph.Width.Advance > maxWidth) { x = 0; y += lineGap; } x += glyph.Width.BearingX; graphics.DrawImageUnscaled(glyph.ToImage(1, true), x, y); x += glyph.Width.Advance - glyph.Width.BearingX; } }
private static void ProcessLabelItem(LabelItem labelItem, Graphics g, PrintLabelSettings settings) { switch (labelItem.LabelType) { case LabelTypesEnum.Label: g.DrawString(labelItem.LabelText, new Font(labelItem.FontName ?? "Arial", labelItem.FontSize, (labelItem.IsBold ? FontStyle.Bold : FontStyle.Regular) | (labelItem.IsItalic ? FontStyle.Italic : FontStyle.Regular)), Brushes.Black, labelItem.StartX, labelItem.StartY); break; case LabelTypesEnum.BarCode: var content = labelItem.LabelText; var writer = new BarcodeWriter { Format = BarcodeFormat.CODE_128, Options = new ZXing.QrCode.QrCodeEncodingOptions { ErrorCorrection = ZXing.QrCode.Internal.ErrorCorrectionLevel.H, Width = settings.BarCodeMaxWidth, Height = settings.BarCodeHeight, PureBarcode = true, } }; var barCodeBmp = writer.Write(content); g.DrawImageUnscaled(barCodeBmp, labelItem.StartX, labelItem.StartY); break; case LabelTypesEnum.Stamp: var pen = new Pen(Color.Black, 2); g.DrawEllipse(pen, labelItem.StartX, labelItem.StartY, settings.StampDiameter, settings.StampDiameter); g.DrawString(labelItem.LabelText, new Font(labelItem.FontName ?? "Arial", labelItem.FontSize, (labelItem.IsBold ? FontStyle.Bold : FontStyle.Regular) | (labelItem.IsItalic ? FontStyle.Italic : FontStyle.Regular)), Brushes.Black, labelItem.StartX + 2, labelItem.StartY + 11); break; } }
public void DrawFormBackgroud(Graphics g, Rectangle r) { drawing = new Bitmap(this.Width, this.Height, g); gg = Graphics.FromImage(drawing); Rectangle shadowRect = new Rectangle(r.X, r.Y, r.Width, 10); Rectangle gradRect = new Rectangle(r.X, r.Y + 9, r.Width, 42); //LinearGradientBrush shadow = new LinearGradientBrush(shadowRect, Color.FromArgb(30, 41, 61), Color.FromArgb(47, 64, 94), LinearGradientMode.Vertical); LinearGradientBrush shadow = new LinearGradientBrush(shadowRect, Color.FromArgb(30, 61, 41), Color.FromArgb(47, colorR, 64), LinearGradientMode.Vertical); //LinearGradientBrush grad = new LinearGradientBrush(gradRect, Color.FromArgb(47, 64, 94), Color.FromArgb(49, 66, 95), LinearGradientMode.Vertical); LinearGradientBrush grad = new LinearGradientBrush(gradRect, Color.Green, Color.DarkGreen, LinearGradientMode.Vertical); ColorBlend blend = new ColorBlend(); // Set multi-color gradient blend.Positions = new[] { 0.0f, 0.35f, 0.5f, 0.65f, 1.0f }; //blend.Colors = new[] { Color.FromArgb(47, 64, 94), Color.FromArgb(64, 88, 126), Color.FromArgb(66, 90, 129), Color.FromArgb(64, 88, 126), Color.FromArgb(49, 66, 95) }; blend.Colors = new[] { Color.FromArgb(47,colorR, 64), Color.FromArgb(64, colorR+32, 88), Color.FromArgb(66, colorR+35, 90), Color.FromArgb(64, colorR+32, 88), Color.FromArgb(49, colorR+1, 66) }; grad.InterpolationColors = blend; Font myf=new System.Drawing.Font(this.Font.FontFamily,16); // Draw basic gradient and shadow //gg.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; gg.FillRectangle(grad, gradRect); gg.FillRectangle(shadow, shadowRect); gg.DrawString("Добавить один ПК", myf, Brushes.GhostWhite, new PointF(55, 15)); gg.DrawImage(Properties.Resources.singleAdd1.ToBitmap(), 10, 10,32,32); g.DrawImageUnscaled(drawing, 0, 0); gg.Dispose(); // Draw checkers //g.FillRectangle(checkers, r); }
public void DrawFormBackgroud(Graphics g, Rectangle r) { drawing = new Bitmap(this.Width, AnimSize, g); gg = Graphics.FromImage(drawing); Rectangle shadowRect = new Rectangle(r.X, r.Y, r.Width, 10); Rectangle gradRect = new Rectangle(r.X, r.Y + 9, r.Width, AnimSize-9); LinearGradientBrush shadow = new LinearGradientBrush(shadowRect, Color.FromArgb(30, 61, 61), Color.FromArgb(47, colorR, colorR), LinearGradientMode.Vertical); //LinearGradientBrush shadow = new LinearGradientBrush(shadowRect, Color.FromArgb(30, 61, 41), Color.FromArgb(47, colorR, 64), LinearGradientMode.Vertical); LinearGradientBrush grad = new LinearGradientBrush(gradRect, Color.FromArgb(47, 64, 94), Color.FromArgb(49, 66, 95), LinearGradientMode.Vertical); //LinearGradientBrush grad = new LinearGradientBrush(gradRect, Color.Green, Color.DarkGreen, LinearGradientMode.Vertical); ColorBlend blend = new ColorBlend(); // Set multi-color gradient blend.Positions = new[] { 0.0f, 0.35f, 0.5f, 0.65f, 0.95f,1f }; blend.Colors = new[] { Color.FromArgb(47, colorR, colorR), Color.FromArgb(64, colorR + 22, colorR + 32), Color.FromArgb(66, colorR + 20, colorR + 35), Color.FromArgb(64, colorR + 20, colorR + 32), Color.FromArgb(49, colorR, colorR + 1), SystemColors.Control }; //blend.Colors = new[] { Color.FromArgb(47, colorR, 64), Color.FromArgb(64, colorR + 32, 88), Color.FromArgb(66, colorR + 35, 90), Color.FromArgb(64, colorR + 32, 88), Color.FromArgb(49, colorR + 1, 66),SystemColors.Control }; grad.InterpolationColors = blend; Font myf = new System.Drawing.Font(this.Font.FontFamily, 16); // Draw basic gradient and shadow //gg.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; gg.FillRectangle(grad, gradRect); gg.FillRectangle(shadow, shadowRect); gg.TextRenderingHint = TextRenderingHint.AntiAlias; gg.DrawString("Поиск по ресурсам сети", myf, Brushes.GhostWhite, new PointF(55, 15)); gg.DrawImage(Properties.Resources.search1.ToBitmap(), 10, 10,32,32); g.DrawImageUnscaled(drawing, 0, 0); gg.Dispose(); // Draw checkers //g.FillRectangle(checkers, r); }
public override void CopyBackBufferToScreen(Graphics displayGraphics) { WidgetForWindowsFormsBitmap aggBitmapAppWidget = ((WidgetForWindowsFormsBitmap)aggAppWidget); RectangleInt intRect = new RectangleInt(0, 0, (int)aggAppWidget.Width, (int)aggAppWidget.Height); aggBitmapAppWidget.bitmapBackBuffer.UpdateHardwareSurface(intRect); if (OsInformation.OperatingSystem != OSType.Windows) { //displayGraphics.DrawImage(aggBitmapAppWidget.bitmapBackBuffer.windowsBitmap, windowsRect, windowsRect, GraphicsUnit.Pixel); // around 250 ms for full screen displayGraphics.DrawImageUnscaled(aggBitmapAppWidget.bitmapBackBuffer.windowsBitmap, 0, 0); // around 200 ms for full screnn } else { // or the code below which calls BitBlt directly running at 17 ms for full screnn. const int SRCCOPY = 0xcc0020; using (Graphics bitmapGraphics = Graphics.FromImage(aggBitmapAppWidget.bitmapBackBuffer.windowsBitmap)) { IntPtr displayHDC = displayGraphics.GetHdc(); IntPtr bitmapHDC = bitmapGraphics.GetHdc(); IntPtr hBitmap = aggBitmapAppWidget.bitmapBackBuffer.windowsBitmap.GetHbitmap(); IntPtr hOldObject = SelectObject(bitmapHDC, hBitmap); int result = BitBlt(displayHDC, 0, 0, aggBitmapAppWidget.bitmapBackBuffer.windowsBitmap.Width, aggBitmapAppWidget.bitmapBackBuffer.windowsBitmap.Height, bitmapHDC, 0, 0, SRCCOPY); SelectObject(bitmapHDC, hOldObject); DeleteObject(hBitmap); bitmapGraphics.ReleaseHdc(bitmapHDC); displayGraphics.ReleaseHdc(displayHDC); } } }
public void PaintHive(Graphics g) { g.FillRectangle(Brushes.SkyBlue, _hiveForm.ClientRectangle); g.DrawImageUnscaled(_hiveInside, 0, 0); foreach (Bee bee in _world.Bees) if (!bee.IsInsideHive) g.DrawImageUnscaled(_beeAnimationLarge[_cell], bee.Location.X, bee.Location.Y); }
public void Draw(Graphics g, Point center, Color color) { g.DrawImageUnscaled( this.Bitmap, center.X - this.Bitmap.Width / 2, center.Y - this.Bitmap.Height / 2 ); }
public override void OnRender(Graphics g) { Matrix temp = g.Transform; g.TranslateTransform(LocalPosition.X, LocalPosition.Y); Image pic = global::MultiWiiWinGUI.Properties.Resources.home; g.DrawImageUnscaled(pic, pic.Width / -2 - 7, -pic.Height-14); g.Transform = temp; }
public Wallpaper() { s = Settings.Instance; allScreen = MultiScreenInfo.Instance; CanAddAnotherBitmap = true; try { desktop = new Bitmap(allScreen.VirtualDesktop.Width, allScreen.VirtualDesktop.Height); gDesktop = Graphics.FromImage(desktop); gDesktop.SetHighQuality(); needFullRedraw = true; try { if (allScreen.IsChanged == false) { var currentPath = GetCurrentPath(); var expectedPath = SafeFilename.Convert(s.SaveFolder, "Current Wallpaper.bmp", true); if (currentPath == expectedPath) { using (var currentDesktop = new Bitmap(currentPath)) { //not needed? if (currentDesktop.Size == allScreen.VirtualDesktop.Size) { gDesktop.DrawImageUnscaled(currentDesktop, 0, 0); needFullRedraw = false; } } } } } catch { } } catch { if (gDesktop != null) { gDesktop.Dispose(); gDesktop = null; } if (desktop != null) { desktop.Dispose(); desktop = null; } } if (desktop == null) { throw new ArgumentException(); } }
public void Render(Graphics g) { if (isFirst) { RePaint(); isFirst = false; } g.DrawImageUnscaled(_page.ImageBuffer, 0, 0); }
public static void DrawLine(Graphics gr, Color color, int x1, int y1, int x2, int y2) { _pixelBitmap.SetPixel(0, 0, color); int pntx = x1; int pnty = y1; int f = 0; int fx; int dx = x2 - x1; int dy = y2 - y1; int sx = Math.Sign(dx); int sy = Math.Sign(dy); dx *= sx; dy *= sy; bool drawHoriz = false; if (Math.Abs(x2 - x1) > Math.Abs(y2 - y1)) { drawHoriz = true; } while (true) { gr.DrawImageUnscaled(_pixelBitmap, pntx, pnty); if ((drawHoriz && pntx == x2) || (!drawHoriz && pnty == y2)) break; if (drawHoriz) { fx = f + dy; f = fx - dx; pntx += sx; } else { fx = f + dx; f = fx - dy; pnty += sy; } if (Math.Abs(fx) < Math.Abs(f)) f = fx; else if (drawHoriz) pnty += sy; else pntx += sx; } //while }
public void Draw(Graphics g) { int x = point.X; int y = point.Y; for (int i = 0; i < 5; i++) { g.DrawImageUnscaled(bmp, x, y); x += 60; } }
public override void OnRender(Graphics g) { #if !PocketPC g.DrawImageUnscaled(localcache2, LocalPosition.X, LocalPosition.Y); #else // DrawImageUnscaled(g, Resources.shadow50, LocalPosition.X, LocalPosition.Y); DrawImageUnscaled(g, Resources.marker, LocalPosition.X, LocalPosition.Y); #endif }
public override void OnRender(Graphics g) { System.Drawing.Drawing2D.Matrix temp = g.Transform; g.TranslateTransform(LocalPosition.X, LocalPosition.Y); g.DrawImageUnscaled(global::SeaScanUAV.Properties.Resources.Glossyblueplane, global::SeaScanUAV.Properties.Resources.Glossyblueplane.Width / -2, global::SeaScanUAV.Properties.Resources.Glossyblueplane.Height / -2);//global::UAVVision.Properties.Resources.Glossyblueplane.Width / -2, global::UAVVision.Properties.Resources.Glossyblueplane.Height / -2); g.Transform = temp; }
/// <summary></summary> /// <param name="box"></param> /// <param name="g"></param> public void PaintBackground(Rectangle box, Graphics g) { if (img == null) { Resize(box); } g.DrawImageUnscaled(img, box.X, box.Y); //g.FillRectangle(brush, box); if (gloss != null) { gloss.PaintGloss(box, g); } }
public static void DrawCardCost(Graphics g, Rectangle rect, string cost) { foreach(string symbol in Helper.GetSymbols(cost)) { using(Image img = Program.LogicHandler.ServicesProvider.ImagesService.GetCardSymbol(symbol)) { g.DrawImageUnscaled(img, rect); rect.X += img.Width; } } }
public void CleanUp(RenderTarget target, Graphics g, Map map) { target.EndDraw(); var wicBitmap = (WICBitmap) target.Tag; using (var image = ConvertToBitmap(wicBitmap)) g.DrawImageUnscaled(image, 0, 0); wicBitmap.Dispose(); target.Dispose(); }
public override void OnRender(Graphics g) { if (!Bearing.HasValue) { g.DrawImageUnscaled(global::Gipasoft.Stabili.UI.GeoLocation.Properties.Resources.shadow50, LocalPosition.X, LocalPosition.Y); } g.TranslateTransform(ToolTipPosition.X, ToolTipPosition.Y); if (Bearing.HasValue) { g.RotateTransform(Bearing.Value); g.FillPolygon(Brushes.Lime, Arrow); } g.ResetTransform(); if (!Bearing.HasValue) { g.DrawImageUnscaled(global::Gipasoft.Stabili.UI.GeoLocation.Properties.Resources.stabile_large, LocalPosition.X, LocalPosition.Y); } }
public void PaintField(Graphics g) { using (Pen brownPen = new Pen(Color.Brown, 6.0F)) { g.FillRectangle(Brushes.SkyBlue, 0, 0, _fieldForm.ClientSize.Width, _fieldForm.ClientSize.Height / 2); g.FillEllipse(Brushes.Yellow, new RectangleF(50, 17, 70, 70)); g.FillRectangle(Brushes.Green, 0, _fieldForm.ClientSize.Height / 2, _fieldForm.ClientSize.Width, _fieldForm.ClientSize.Height / 2); g.DrawLine(brownPen, new Point(643, 0), new Point(643, 30)); g.DrawImageUnscaled(_hiveOutside, 600, 20); foreach (Flower flower in _world.Flowers) g.DrawImageUnscaled(_flower, flower.Location.X, flower.Location.Y); foreach (Bee bee in _world.Bees) if (!bee.IsInsideHive) g.DrawImageUnscaled(_beeAnimationSmall[_cell], bee.Location.X, bee.Location.Y); } }