Exemplo n.º 1
0
        /// <summary>
        /// Paint the pixel at given position.
        /// </summary>
        /// <param name="pos"></param>
        private void PaintPixel(Position pos)
        {
            Pixel paintedPixel = Painter.Paints[pos];

            if (paintedPixel == null)
            {
                paintedPixel = new Pixel(Raster.GetValue(pos, Painter.ActiveLayer), pos);
                Painter.Paints.Add(paintedPixel);
            }
            else
            {
                Display.RemoveElement(paintedPixel.GraphicElement);
            }
            paintedPixel.NewValue       = Convert.ToDouble(selectedValue);
            paintedPixel.GraphicElement = Display.DrawBox(pos,
                                                          Painter.GetPaintSymbol(selectedColor),
                                                          Painter.ActiveLayer, true);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Gets the render color of the specific position in the input raster layer.
 /// </summary>
 /// <param name="rasterLayer"></param>
 /// <param name="position"></param>
 /// <returns></returns>
 public static IColor GetRenderColor(IRasterLayer rasterLayer, Position position)
 {
     return(GetRenderColor(rasterLayer, Raster.GetValue(position, rasterLayer)));
 }