public Renderer(SwapChainPanel swapChainPanel, RasterBrushStyle style, MediaColor color) { StrokeHandler = new RasterStrokeHandler(this, style, color, Graphics); mSwapChainPanel = swapChainPanel; Graphics.GraphicsReady += OnGraphicsReady; Graphics.Initialize(mSwapChainPanel, false); }
public void SetHandler(RasterBrushStyle brushStyle, MediaColor brushColor) { if (StrokeHandler is RasterStrokeHandler) { StrokeHandler.SetBrushStyle(brushStyle); StrokeHandler.BrushColor = brushColor; } else { StrokeHandler = new RasterStrokeHandler(this, brushStyle, brushColor, Graphics); StrokeHandler.DoGraphicsReady(); ClearLayers(); PresentGraphics(); } }