Наследование: IDisposablePlus
Пример #1
0
        public void ClearLayers()
        {
            LayerBase[] layers = new LayerBase[Layers.Values.Count];
            Layers.Values.CopyTo(layers, 0);

            foreach(LayerBase layer in layers)
                layer.Dispose();

            Layers.Clear();
        }
Пример #2
0
 private DebugLabel(LayerBase layer, IDebuggable parent)
     : base(layer)
 {
     SetParent(parent);
 }
Пример #3
0
 public Triangle(LayerBase layer)
     : base(layer)
 {
 }
Пример #4
0
        internal void AddLayer(LayerBase layer)
        {
            if (layer == null)
                throw new ArgumentNullException();

            if (Layers.ContainsValue(layer))
                throw new ArgumentException("Duplicate layer added to DrawEngine2d.");

            if (!layer.IsDebugLayer)
            {
                if (layer.ZIndex > LayerMaxZIndex || layer.ZIndex < LayerMinZIndex)
                    throw new InvalidOperationException();
            }

            if (Layers.ContainsKey(layer.ZIndex))
                throw new ArgumentException("Duplicate layer added to DrawEngine2d.");

            Layers.Add(layer.ZIndex, layer);

            DrawEngine2d.SetRenderRequired();
        }
Пример #5
0
 public Rectangle(LayerBase layer)
     : base(layer)
 {
 }
Пример #6
0
        public void RemoveLayer(LayerBase layer)
        {
            if(layer == null)
                throw new ArgumentNullException();

            if(!Layers.ContainsValue(layer))
                throw new ArgumentException("Unknown layer requested for removal from DrawEngine2d.");

            Int32 valueLocation = Layers.IndexOfValue(layer);
            Int32 zIndex = Layers.Keys[valueLocation];
            Layers.Remove(zIndex);

            DrawEngine2d.SetRenderRequired();
        }
Пример #7
0
        private void InitializeInternal(LayerBase layer)
        {
            InitializeLayer(layer);

            InitializeRecalcRequired();
            InitializeVisible();
            InitializeBounds();

            InitializeDebugInfo();
        }
Пример #8
0
 private void InitializeLayer(LayerBase layer)
 {
     Layer = layer;
     Layer.AddDrawable(this);
 }
Пример #9
0
 public void ChangeLayer(LayerBase layer)
 {
     throw new NotImplementedException();
     //remember to update the debugInfo's layer too.
 }
Пример #10
0
 public DrawableBase(LayerBase layer)
 {
     InitializeInternal(layer);
     InitializeIntermediary();
     Initialize();
 }
Пример #11
0
 public Sprite(LayerBase layer, KeyBase key)
     : base(layer)
 {
     InitializeCustom(key);
 }
Пример #12
0
 public Label(LayerBase layer)
     : base(layer)
 {
 }
Пример #13
0
 public Image(LayerBase layer, String path = null)
     : base(layer)
 {
     SetSourceImage(path);
 }
Пример #14
0
 public VectorDrawableBase(LayerBase layer)
     : base(layer)
 {
 }
Пример #15
0
 public SpriteDrawableBase(LayerBase layer)
     : base(layer)
 {
 }