Skip to content

Commit

Permalink
SP5: always reset shader when applying paints
Browse files Browse the repository at this point in the history
  • Loading branch information
swharden committed Dec 24, 2023
1 parent f46dfe3 commit eaae117
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* Rendering: Added `RenderManager.RenderStarting` event to allow modification of plottable properties (#3077) _Thanks GooBad_
* Rendering: Added `RenderManager.PreRenderLock` event so developers of multi-threaded applications can ensure plottables are stable at render time (#3095) _Thanks @bclehmann_
* Statistics: Added descriptive statistics methods and improved support for 2D arrays (#3113, #3121) _Thanks @arthurits_
* Rendering: Improved appearance of shapes with custom hatches and outlines (#3099) _Thanks @faguetan_

## ScottPlot 4.1.70 (in development)
* Population Plot: Improved performance for populations with curves that run off the screen (#3054) _Thanks @Em3a-c and @cornford_
Expand Down
2 changes: 2 additions & 0 deletions src/ScottPlot5/ScottPlot5/Extensions/SkiaSharpExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public static PixelRect ToPixelRect(this SKRect rect)

public static void ApplyToPaint(this LineStyle style, SKPaint paint)
{
paint.Shader = null;
paint.IsStroke = true;
paint.Color = style.Color.ToSKColor();
paint.StrokeWidth = style.Width;
Expand All @@ -90,6 +91,7 @@ public static void ApplyToPaint(this FillStyle fs, SKPaint paint)

public static void ApplyToPaint(this FontStyle fontStyle, SKPaint paint)
{
paint.Shader = null;
paint.IsStroke = false;
paint.Typeface = fontStyle.Typeface;
paint.TextSize = fontStyle.Size;
Expand Down

0 comments on commit eaae117

Please sign in to comment.