-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -591,7 +591,7 @@ private void DrawMessage(Comment comment, List<SKBitmap> sectionImages, List<(Po | |
DrawText(messageBuffer.ToString(), messageFont, true, sectionImages, ref drawPos, defaultPos); | ||
messageBuffer.Clear(); | ||
} | ||
SKPaint fallbackFont = GetFallbackFont(char.ConvertToUtf32(fragmentChars[j], fragmentChars[j + 1]), renderOptions); | ||
using SKPaint fallbackFont = GetFallbackFont(char.ConvertToUtf32(fragmentChars[j], fragmentChars[j + 1]), renderOptions).Clone(); | ||
fallbackFont.Color = renderOptions.MessageColor; | ||
DrawText(fragmentChars[j].ToString() + fragmentChars[j + 1].ToString(), fallbackFont, false, sectionImages, ref drawPos, defaultPos); | ||
j++; | ||
|
@@ -603,7 +603,7 @@ private void DrawMessage(Comment comment, List<SKBitmap> sectionImages, List<(Po | |
DrawText(messageBuffer.ToString(), messageFont, true, sectionImages, ref drawPos, defaultPos); | ||
messageBuffer.Clear(); | ||
} | ||
SKPaint fallbackFont = GetFallbackFont(fragmentChars[j], renderOptions); | ||
using SKPaint fallbackFont = GetFallbackFont(fragmentChars[j], renderOptions).Clone(); | ||
fallbackFont.Color = renderOptions.MessageColor; | ||
DrawText(fragmentChars[j].ToString(), fallbackFont, true, sectionImages, ref drawPos, defaultPos); | ||
} | ||
|
@@ -824,6 +824,7 @@ private void DrawUsername(Comment comment, List<SKBitmap> sectionImages, ref Poi | |
userPaint.Color = userColor; | ||
sectionImageCanvas.DrawText(comment.commenter.display_name + ":", drawPos.X, drawPos.Y, userPaint); | ||
drawPos.X += textWidth + renderOptions.WordSpacing; | ||
userPaint.Dispose(); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
lay295
Author
Owner
|
||
} | ||
|
||
private static SKColor GenerateUserColor(SKColor userColor, SKColor background_color, ChatRenderOptions renderOptions) | ||
|
You just reintroduced #448. We can't dispose because userPaint is a shallow copy.