mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 13:33:27 -07:00
Disposing matrix in the new code, otherwise it would cause memory leaks
This commit is contained in:
parent
4d6bf9f1ad
commit
4b8ec88aaf
3 changed files with 10 additions and 4 deletions
|
|
@ -148,9 +148,10 @@ namespace Greenshot.Drawing {
|
|||
state = graphics.Save();
|
||||
// Draw bubble where the Tail is not visible.
|
||||
using (Region clipRegion = new Region(tail)) {
|
||||
Matrix transformMatrix = new Matrix();
|
||||
transformMatrix.Rotate(tailAngle);
|
||||
clipRegion.Transform(transformMatrix);
|
||||
using (Matrix transformMatrix = new Matrix()) {
|
||||
transformMatrix.Rotate(tailAngle);
|
||||
clipRegion.Transform(transformMatrix);
|
||||
}
|
||||
clipRegion.Translate(rect.Left + (rect.Width / 2), rect.Top + (rect.Height / 2));
|
||||
graphics.SetClip(clipRegion, CombineMode.Exclude);
|
||||
graphics.TranslateTransform(rect.Left, rect.Top);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue