Exemplo n.º 1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="layer"></param>
        public void Remove(Layer layer)
        {
            if (layer == null)
                return;

            layer.PropertyChanged -= LayerObserver;

            Verbose("Remove Layer: " + layer.Name);

            if (layer.Shapes != null)
            {
                Remove(layer.Shapes);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="layer"></param>
        public void Add(Layer layer)
        {
            if (layer == null)
                return;

            layer.PropertyChanged += LayerObserver;

            Verbose("Add Layer: " + layer.Name);

            if (layer.Shapes != null)
            {
                Add(layer.Shapes);
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="gfx"></param>
 /// <param name="layer"></param>
 /// <param name="db"></param>
 /// <param name="r"></param>
 public void Draw(object gfx, Layer layer, ImmutableArray<ShapeProperty> db, Record r)
 {
     foreach (var shape in layer.Shapes)
     {
         if (shape.State.Flags.HasFlag(_state.DrawShapeState.Flags))
         {
             shape.Draw(gfx, this, 0, 0, db, r);
         }
     }
 }