Example #1
0
 public void Render(IRenderTargetProvider provider)
 {
     renderedPathInfosCore = new List <RenderedPathInfo>();
     foreach (var path in provider.Paths)
     {
         RenderedPathInfo renderedPathInfo = RenderPath(path);
         renderedPathInfosCore.Add(renderedPathInfo);
     }
 }
Example #2
0
        protected virtual RenderedPathInfo RenderPath(Path path)
        {
            RenderedPathInfo renderedPathInfo = new RenderedPathInfo(path.PathAppearance, path.LocationInfo);

            foreach (var command in path.PathCommands)
            {
                RenderPathCommand(renderedPathInfo, command);
            }
            return(renderedPathInfo);
        }
Example #3
0
        protected virtual void RenderPathCommand(RenderedPathInfo renderedPathInfo, PathCommand command)
        {
            switch (command.Type)
            {
            case PathCommandType.MoveTo: renderedPathInfo.MoveTo(command.Args as MoveToCommandArgs); break;

            case PathCommandType.LineTo: renderedPathInfo.LineTo(command.Args as MoveToCommandArgs); break;

            case PathCommandType.CurveTo:
            case PathCommandType.QuadraticCurveTo:
            case PathCommandType.SmoothCurveTo:
            case PathCommandType.SmoothQuadraticCurveTo: renderedPathInfo.CurveTo(command.Args as MoveToCommandArgs); break;
            }
        }
 protected virtual void RenderPathCommand(RenderedPathInfo renderedPathInfo, PathCommand command) {
     switch(command.Type) {
         case PathCommandType.MoveTo: renderedPathInfo.MoveTo(command.Args as MoveToCommandArgs); break;
         case PathCommandType.LineTo: renderedPathInfo.LineTo(command.Args as MoveToCommandArgs); break;
         case PathCommandType.CurveTo:
         case PathCommandType.QuadraticCurveTo:
         case PathCommandType.SmoothCurveTo:
         case PathCommandType.SmoothQuadraticCurveTo: renderedPathInfo.CurveTo(command.Args as MoveToCommandArgs); break;
     }
 }
 protected virtual RenderedPathInfo RenderPath(Path path) {
     RenderedPathInfo renderedPathInfo = new RenderedPathInfo(path.PathAppearance, path.LocationInfo);
     foreach(var command in path.PathCommands) {
         RenderPathCommand(renderedPathInfo, command);
     }
     return renderedPathInfo;
 }