private void InitColorPallette() { switch (palette) { case Palettes.RedGreenBlue: colors = HSV.RedGreenBlue(); break; case Palettes.BlackWhite: colors = HSV.BlackWhite(); break; case Palettes.RedGreen: colors = HSV.RedGreen(); break; case Palettes.RedBlue: colors = HSV.RedBlue(); break; case Palettes.BlueGreen: colors = HSV.BlueGreen(); break; } }
public ColorGradient(WriteableBitmap wb) { this.wb = wb; colors = HSV.RedGreenBlue(); counter = 0; InitBuffer(); }
private void init_MovingText() { colors = HSV.RedGreenBlue(); textBox = new TextBox(); textBox.FontSize = 20; textBox.Text = ("Text"); textBox.FontWeight = FontWeights.UltraLight; textBox.Foreground = Brushes.White; renderTargetBitmap = new RenderTargetBitmap(monitor.PixelWidth, monitor.PixelHeight, monitor.DpiX, monitor.DpiY, PixelFormats.Default); Pos = new Point(10, 10); drawingVisual = new DrawingVisual(); }
public Plasma(WriteableBitmap wbm) { plasma = new int[wbm.PixelWidth, wbm.PixelHeight]; colors = HSV.RedGreenBlue(); timer = 1; this.monitor = wbm; for (int y = 0; y < wbm.PixelHeight; y++) { for (int x = 0; x < wbm.PixelWidth; x++) { int c = (int)( HSV.colorcount + (HSV.colorcount * Math.Sin(x / 8.0)) + HSV.colorcount + (HSV.colorcount * Math.Sin(y / 8.0)) + HSV.colorcount + (HSV.colorcount * Math.Sin((x + y) / 8.0)) + HSV.colorcount + (HSV.colorcount * Math.Sin(Math.Sqrt((double)(x * x + y * y)) / 8.0)) ) / 4; plasma[x, y] = c; } } }