aboutsummaryrefslogtreecommitdiff
path: root/src/osx/graphics/quartz/Painter.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-10-31 22:53:11 +0800
committercrupest <crupest@outlook.com>2021-10-31 22:53:11 +0800
commit1dca2841da6f024f613d6dc16de456d5035f8fce (patch)
tree37ca6290afbe5900df2eb4a09e30024257d55316 /src/osx/graphics/quartz/Painter.cpp
parente68e0d9a5130e8bc0b634572b7fd44b9bfc0f8ef (diff)
downloadcru-1dca2841da6f024f613d6dc16de456d5035f8fce.tar.gz
cru-1dca2841da6f024f613d6dc16de456d5035f8fce.tar.bz2
cru-1dca2841da6f024f613d6dc16de456d5035f8fce.zip
...
Diffstat (limited to 'src/osx/graphics/quartz/Painter.cpp')
-rw-r--r--src/osx/graphics/quartz/Painter.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/osx/graphics/quartz/Painter.cpp b/src/osx/graphics/quartz/Painter.cpp
index 5657e048..798e1256 100644
--- a/src/osx/graphics/quartz/Painter.cpp
+++ b/src/osx/graphics/quartz/Painter.cpp
@@ -158,16 +158,7 @@ void QuartzCGContextPainter::DrawText(const Point& offset,
color = colors::black;
}
- auto bounds = tl->GetTextBounds();
-
- bounds.width += bounds.left;
- bounds.height += bounds.top;
- bounds.left = bounds.top = 0;
-
- Matrix transform =
- Matrix::Translation(-bounds.width / 2, -bounds.height / 2) *
- Matrix::Scale(1, -1) *
- Matrix::Translation(bounds.width / 2, bounds.height / 2);
+ Matrix transform = tl->GetTransform();
CGContextSaveGState(cg_context_);