Ejemplo n.º 1
0
 public override BitmapBase Apply(Tank tank, BitmapBase layer)
 {
     if (ShiftX == 0 && ShiftY == 0)
         return layer;
     var result = new BitmapRam(layer.Width, layer.Height);
     result.DrawImage(layer, ShiftX, ShiftY);
     return result;
 }
Ejemplo n.º 2
0
        public override BitmapBase Apply(RenderTask renderTask, BitmapBase layer)
        {
            Tank tank = renderTask.Tank;

            if (ShiftX == 0 && ShiftY == 0)
            {
                return(layer);
            }
            var result = new BitmapRam(Math.Max(1, layer.Width + ShiftX), Math.Max(1, layer.Height + ShiftY));

            result.DrawImage(layer, ShiftX, ShiftY);
            return(result);
        }
Ejemplo n.º 3
0
        public override BitmapBase Apply(RenderTask renderTask, BitmapBase layer)
        {
            Tank tank    = renderTask.Tank;
            var  outline = new BitmapRam(layer.Width, layer.Height);

            layer.GetOutline(outline, Color.GetColorWpf(tank), Threshold, Inside);
            if (KeepImage)
            {
                layer.DrawImage(outline);
                return(layer);
            }
            else
            {
                return(outline);
            }
        }
Ejemplo n.º 4
0
 public override BitmapBase Apply(Tank tank, BitmapBase layer)
 {
     var outline = new BitmapRam(layer.Width, layer.Height);
     layer.GetOutline(outline, Color.GetColorWpf(tank), Threshold, Inside);
     if (KeepImage)
     {
         layer.DrawImage(outline);
         return layer;
     }
     else
         return outline;
 }