private void Update(Draw d) { world.Update(d, properties.SelectedObjects); if (curRectangle != Rectangle.Empty) { d.MoveCoords(world.Viewport.X, world.Viewport.Y); d.DrawRectangle(dPen.FromGDI(Pens.DodgerBlue), curRectangle.X, curRectangle.Y, curRectangle.Width, curRectangle.Height); dColor color = new dColor(Color.DodgerBlue); color.A = 25; d.FillRectangle(new dPen(color), curRectangle.X, curRectangle.Y, curRectangle.Width, curRectangle.Height); d.MoveCoords(-world.Viewport.X, -world.Viewport.Y); } }
public dPen(dColor color) : this(color, dPenStyle.Solid) { }
public abstract void DrawString(string text, dFont font, dColor color, float x, float y);
public dPen(dColor color, dPenStyle style) { this.Color = color; this.Style = style; }
public override void DrawString(string text, dFont font, dColor color, float x, float y) { System.Drawing.SolidBrush b = new System.Drawing.SolidBrush(color.ToGDI()); System.Drawing.Font f = new System.Drawing.Font(font.Family, font.Size, font.Style.ToGDI()); g.DrawString(text, f, b, (int)x, (int)y, font.Format.ToGDI()); }