Skip to content

Commit 429b0c3

Browse files
committed
Add ModifySolidBrush method to update formatted text
A new `ModifySolidBrush()` method was introduced in the `Editor` namespace within `StaticText.cs`. This method updates the `_formattedTextExtended` object by invoking `FontFactory.GetFormattedTextExtended()` with parameters including `Text`, `FontType`, `FontSize` scaled by `FontSizeFactor`, `FontWeight`, and a `false` value for the last argument.
1 parent 6709979 commit 429b0c3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Editor/Equations/Common/StaticText.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ public override void DrawEquation(DrawingContext dc, bool forceBlackBrush)
2727
_formattedTextExtended.DrawTextTopLeftAligned(dc, new Point(Left + LeftMarginFactor * FontSize, Top + TopOffestFactor * Height), forceBlackBrush);
2828
}
2929

30+
public override void ModifySolidBrush()
31+
{
32+
_formattedTextExtended = FontFactory.GetFormattedTextExtended(Text, FontType, FontSize * FontSizeFactor, FontWeight, false);
33+
}
34+
3035
public override double FontSize
3136
{
3237
get => base.FontSize;

0 commit comments

Comments
 (0)