aboutsummaryrefslogtreecommitdiff
path: root/src/win/graphics/direct
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-03-13 17:40:18 +0800
committercrupest <crupest@outlook.com>2021-03-13 17:40:18 +0800
commit7703063a5816b089483e78ccd74bb9902ccfbea8 (patch)
treeb4b0fd45eb6a89831921d6b78c322e6aa882c239 /src/win/graphics/direct
parent49dfb2bc9f965b398aa12e711148696d28443eaf (diff)
downloadcru-7703063a5816b089483e78ccd74bb9902ccfbea8.tar.gz
cru-7703063a5816b089483e78ccd74bb9902ccfbea8.tar.bz2
cru-7703063a5816b089483e78ccd74bb9902ccfbea8.zip
...
Diffstat (limited to 'src/win/graphics/direct')
-rw-r--r--src/win/graphics/direct/Painter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/win/graphics/direct/Painter.cpp b/src/win/graphics/direct/Painter.cpp
index 91392ba7..d6999cfa 100644
--- a/src/win/graphics/direct/Painter.cpp
+++ b/src/win/graphics/direct/Painter.cpp
@@ -32,6 +32,14 @@ void D2DPainter::Clear(const Color& color) {
render_target_->Clear(Convert(color));
}
+void D2DPainter::DrawLine(const Point& start, const Point& end, IBrush* brush,
+ float width) {
+ CheckValidation();
+ const auto b = CheckPlatform<ID2DBrush>(brush, GetPlatformId());
+ render_target_->DrawLine(Convert(start), Convert(end),
+ b->GetD2DBrushInterface(), width);
+}
+
void D2DPainter::StrokeRectangle(const Rect& rectangle, IBrush* brush,
float width) {
CheckValidation();