aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/osx/graphics/quartz/Painter.cpp2
-rw-r--r--src/ui/render/BorderRenderObject.cpp12
2 files changed, 12 insertions, 2 deletions
diff --git a/src/osx/graphics/quartz/Painter.cpp b/src/osx/graphics/quartz/Painter.cpp
index ec951e6c..5657e048 100644
--- a/src/osx/graphics/quartz/Painter.cpp
+++ b/src/osx/graphics/quartz/Painter.cpp
@@ -141,7 +141,7 @@ void QuartzCGContextPainter::FillGeometry(IGeometry* geometry, IBrush* brush) {
b->Select(cg_context_);
CGContextBeginPath(cg_context_);
CGContextAddPath(cg_context_, g->GetCGPath());
- CGContextFillPath(cg_context_);
+ CGContextEOFillPath(cg_context_);
}
void QuartzCGContextPainter::DrawText(const Point& offset,
diff --git a/src/ui/render/BorderRenderObject.cpp b/src/ui/render/BorderRenderObject.cpp
index 9e081828..9b886348 100644
--- a/src/ui/render/BorderRenderObject.cpp
+++ b/src/ui/render/BorderRenderObject.cpp
@@ -6,8 +6,8 @@
#include "cru/platform/graphics/Geometry.hpp"
#include "cru/platform/graphics/util/Painter.hpp"
#include "cru/ui/Base.hpp"
+#include "cru/ui/DebugFlags.hpp"
#include "cru/ui/style/ApplyBorderStyleInfo.hpp"
-#include "gsl/gsl_assert"
#include <algorithm>
@@ -56,9 +56,19 @@ RenderObject* BorderRenderObject::HitTest(const Point& point) {
}
void BorderRenderObject::OnDrawCore(platform::graphics::IPainter* painter) {
+ if constexpr (debug_flags::draw) {
+ log::TagDebug(
+ log_tag, u"BorderRenderObject draw, background: {}, foreground: {}.",
+ background_brush_ == nullptr ? u"NONE"
+ : background_brush_->GetDebugString(),
+ foreground_brush_ == nullptr ? u"NONE"
+ : foreground_brush_->GetDebugString());
+ }
+
if (background_brush_ != nullptr)
painter->FillGeometry(border_inner_geometry_.get(),
background_brush_.get());
+
if (is_border_enabled_) {
if (border_brush_ == nullptr) {
log::TagWarn(log_tag, u"Border is enabled but border brush is null.");