Esempio n. 1
0
        /// <summary>
        /// Constructor. Creates rendering brush; initializes graphics
        /// </summary>
        /// <param name="swapChainPanel">SwapChainPanel on which to render captured ink</param>
        /// <param name="brushType">Type of brush to use</param>
        /// <param name="thickness">Relative thickness of brush</param>
        /// <param name="color">Color of ink</param>
        /// <param name="style">Shape of brush (VectorBrush only)</param>
        public Renderer(SwapChainPanel swapChainPanel, VectorBrushStyle style, MediaColor color)
        {
            StrokeHandler = new VectorStrokeHandler(this, style, color);

            mSwapChainPanel         = swapChainPanel;
            Graphics.GraphicsReady += OnGraphicsReady;
            Graphics.Initialize(mSwapChainPanel, false);
        }
Esempio n. 2
0
 public void SetHandler(VectorBrushStyle brushStyle, MediaColor brushColor)
 {
     if (StrokeHandler is VectorStrokeHandler)
     {
         StrokeHandler.SetBrushStyle(brushStyle);
         StrokeHandler.BrushColor = brushColor;
     }
     else
     {
         StrokeHandler = new VectorStrokeHandler(this, brushStyle, brushColor);
         // Clear screen
         ClearLayers();
         PresentGraphics();
     }
 }
 public VectorManipulationTool(VectorStrokeHandler strokeHandler, ManipulationMode mode)
     : base(mode)
 {
     mStrokeHandler = strokeHandler;
 }