public void Draw(SinglePixelDTO pixelDTO) { var device = _connector.GetDevice(); var image = device.Image; var pixelAdress = _pixelPointer.GetDevicePixel(pixelDTO.PixelLocation); image.SetPixel(pixelAdress, 0, pixelDTO.Color); device.Update(); }
private SinglePixelDTO BuildDTO(SinglePixelRequest request) { var dto = new SinglePixelDTO(); dto.PixelLocation = new PixelLocationDTO { Row = request.Row, Col = request.Col }; dto.Color = Color.FromArgb(0xff, request.Red, request.Green, request.Blue); return(dto); }