Exemple #1
0
 public override void Render(Renderer renderer, bool selected)
 {
   renderer.PushPen();
   renderer.Pen = SceneConstants.ManipPen;
   renderer.FillCircle(this.PositionCircle);
   if(selected && this.EnableRotate)
   {
     renderer.DrawLine(this.Position, this.AngleCircle.Center);
     renderer.FillCircle(this.AngleCircle);
   }
   
   renderer.PopPen();
 }
Exemple #2
0
 public override void Render(Shape shape, Renderer renderer, bool selected)
 {
   if(this.Material != null)
   {
     Quad2f imageQuad = GetShapeQuad(shape);
     renderer.DrawImage(this.Material, imageQuad);
     if(selected)
     {
       renderer.PushPen();
       renderer.Pen = SceneConstants.HighlightPen;
       renderer.DrawLine(imageQuad.Vertices, true);
       renderer.PopPen();
     }
   }
 }
Exemple #3
0
    public override void Render(Shape shape, Renderer renderer, bool selected)
    {
      Circle circle = GetShapeCircle(shape);
      renderer.PushPen();
      Pen pen = new Pen(shape.Color);
      renderer.Pen = pen;
      if(this.Solid)
      {
        renderer.FillCircle(circle);
      }
      else
      {
        pen.Width = SceneConstants.PenWidth;
        renderer.DrawCircle(circle);
      }

      renderer.PopPen();
    }
Exemple #4
0
    private void RenderGridLines(Renderer renderer, Vector2f p0, Vector2f p1, Vector2f dp, uint amount)
    {
      renderer.PushPen();
      renderer.Pen = SceneConstants.GridPen;
      for(uint index = 0; index < amount; ++index)
      {
        renderer.DrawLine(p0, p1);
        p0 += dp;
        p1 += dp;
      }

      renderer.PopPen();
    }
Exemple #5
0
 protected override void OnPaint(Renderer renderer)
 {
   base.OnPaint(renderer);
   if(this.SelectedScene != null)
   {
     RenderGrid(renderer);
     if(this.TemplateVisible)
     {
       Color color = Color.FromArgb(127, Color.White);
       renderer.PushPen();
       renderer.Pen = new Pen(color);
       this.ActiveTemplate.Render(renderer, m_TemplatePreviewPos);
       renderer.PopPen();
     }
   }
 }
Exemple #6
0
 public override void Render(Shape shape, Renderer renderer, bool selected)
 {
   renderer.PushPen();
   Pen pen = new Pen(shape.Color);
   pen.Width = SceneConstants.PenWidth;
   renderer.Pen = pen;
   Quad2f quad = GetShapeQuad(shape);
   renderer.DrawLine(quad.Vertices, true);
   renderer.PopPen();
 }