Exemplo n.º 1
0
 /// Copy this block of data into a Color[] array
 public void copy(Color[] color)
 {
     if (this.pixels.Length != color.Length)
     {
         // N.Console.Error("Buffer sizes do not match for color conversion");
         return;
     }
     for (var i = 0; i < this._height * this._width; ++i)
     {
         PixelBlock.copy(this._buffer[i], out color[i]);
     }
 }
Exemplo n.º 2
0
 /// Create a new texture instance
 public Texture2D produce() {
   var rtn = new Texture2D(this._width, this._height, TextureFormat.ARGB32, false);
   if (this._pixels == null) {
     this._pixels = new Color[this._width * this._height];
     var block = new PixelBlock(this._width, this._height);
     block.set(this._color);
     block.copy(this._pixels);
   }
   rtn.SetPixels(this._pixels, 0);
   this._pixels = null;
   rtn.Apply();
   return rtn;
 }
Exemplo n.º 3
0
        /// Create a new texture instance
        public Texture2D produce()
        {
            var rtn = new Texture2D(this._width, this._height, TextureFormat.ARGB32, false);

            if (this._pixels == null)
            {
                this._pixels = new Color[this._width * this._height];
                var block = new PixelBlock(this._width, this._height);
                block.set(this._color);
                block.copy(this._pixels);
            }
            rtn.SetPixels(this._pixels, 0);
            this._pixels = null;
            rtn.Apply();
            return(rtn);
        }
Exemplo n.º 4
0
 public Bresenham(PixelBlock target, UInt32 color) : base(target, color) {}
Exemplo n.º 5
0
 /// Create a new instance with a pixel target
 public PixelPusher(PixelBlock target, UInt32 color)
 {
     this.target = target;
     this.color  = color;
 }
Exemplo n.º 6
0
 /// Create a new instance with a pixel target
 public PixelPusher(PixelBlock target, UInt32 color) {
   this.target = target;
   this.color = color;
 }