Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
 public dPen(dColor color)
     : this(color, dPenStyle.Solid)
 {
 }
Beispiel #3
0
 public abstract void DrawString(string text, dFont font, dColor color, float x, float y);
Beispiel #4
0
 public dPen(dColor color, dPenStyle style)
 {
     this.Color = color;
     this.Style = style;
 }
Beispiel #5
0
 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());
 }