aboutsummaryrefslogtreecommitdiff
path: root/src/osx/graphics/quartz/Brush.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-08-22 22:19:59 +0800
committercrupest <crupest@outlook.com>2021-08-22 22:19:59 +0800
commit100c2ae5cd7b815dc9accca0fa9ceaca2f5d1020 (patch)
tree35af05c94af8ff616e83f199cef971811ff1ecf8 /src/osx/graphics/quartz/Brush.cpp
parent7fa6f61b1d7b253f749be73a4bfeee9a77cd2e88 (diff)
downloadcru-100c2ae5cd7b815dc9accca0fa9ceaca2f5d1020.tar.gz
cru-100c2ae5cd7b815dc9accca0fa9ceaca2f5d1020.tar.bz2
cru-100c2ae5cd7b815dc9accca0fa9ceaca2f5d1020.zip
...
Diffstat (limited to 'src/osx/graphics/quartz/Brush.cpp')
-rw-r--r--src/osx/graphics/quartz/Brush.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/osx/graphics/quartz/Brush.cpp b/src/osx/graphics/quartz/Brush.cpp
index a930719c..6e4893b1 100644
--- a/src/osx/graphics/quartz/Brush.cpp
+++ b/src/osx/graphics/quartz/Brush.cpp
@@ -18,4 +18,13 @@ void QuartzSolidColorBrush::SetColor(const Color& color) {
CGColorCreateGenericRGB(color.GetFloatRed(), color.GetFloatGreen(),
color.GetFloatBlue(), color.GetFloatAlpha());
}
+
+void QuartzSolidColorBrush::Select(CGContextRef context) {
+ CGContextSaveGState(context);
+
+ CGContextSetStrokeColorWithColor(context, cg_color_);
+ CGContextSetFillColorWithColor(context, cg_color_);
+
+ CGContextRestoreGState(context);
+}
} // namespace cru::platform::graphics::osx::quartz