Ejemplo n.º 1
0
        public Renderer(SwapChainPanel swapChainPanel, RasterBrushStyle style, MediaColor color)
        {
            StrokeHandler = new RasterStrokeHandler(this, style, color, Graphics);

            mSwapChainPanel         = swapChainPanel;
            Graphics.GraphicsReady += OnGraphicsReady;
            Graphics.Initialize(mSwapChainPanel, false);
        }
Ejemplo n.º 2
0
 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();
     }
 }