dittodhole / dotnet-Svg.Contrib.Render

Other
26 stars 5 forks source link

GW command is missing a trailing comma #24

Open dittodhole opened 2 years ago

dittodhole commented 2 years ago

https://github.com/dittodhole/dotnet-Svg.Contrib.Render/blob/9308b5c5f793d1b5531529056f740367a33d5ce2/src/Svg.Contrib.Render.EPL/EplCommands.cs#L108

Mitigation

public class CustomBootstrapper : Svg.Contrib.Render.EPL.DefaultBootstrapper
{
  /// <inheritdoc/>
  protected override Svg.Contrib.Render.EPL.EplCommands CreateEplCommands() => new CustomEplCommands();
}

public class CustomEplCommands : Svg.Contrib.Render.EPL.EplCommands
{
  /// <inheritdoc/>
  public override string GraphicDirectWrite(
    int horizontalStart,
    int verticalStart,
    int numberOfBytesPerRow,
    int rows)
  {
    var result = base.GraphicDirectWrite(
      horizontalStart,
      verticalStart,
      numberOfBytesPerRow,
      rows);

    return string.Concat(
      result, // $"GW{horizontalStart},{verticalStart},{numberOfBytesPerRow},{rows}"
      ",");
  }
}