PdfSharp.Xps.Rendering.PdfContentWriter.WriteSingleLineStrokeWithSpecialCaps C# (CSharp) Méthode

WriteSingleLineStrokeWithSpecialCaps() private méthode

If the path is a single line with different start and end caps, convert the line into an area.
private WriteSingleLineStrokeWithSpecialCaps ( PdfSharp.Xps.XpsModel.Path path ) : bool
path PdfSharp.Xps.XpsModel.Path
Résultat bool
    private bool WriteSingleLineStrokeWithSpecialCaps(Path path)
    {
      if (path.StrokeStartLineCap == path.StrokeEndLineCap && path.StrokeStartLineCap != LineCap.Triangle)
        return false;
      if (path.Data.Figures.Count != 1)
        return false;
      PathFigure figure = path.Data.Figures[0];
      if (figure.Segments.Count != 1)
        return false;
      PolyLineSegment polyLineSegment = figure.Segments[0] as PolyLineSegment;
      if (polyLineSegment.Points.Count != 1)
        return false;

      // TODO: Create a new path that draws the line
      path.GetType();

      return false;
    }