Skip to content

Commit

Permalink
Fix invalid nanovg calls
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed Jan 4, 2025
1 parent 5ede1fa commit 917655f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions library/lib/core/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,17 +309,18 @@ void View::drawWireframe(FrameContext* ctx, Rect frame)
if (this->hasParent())
{
// Diagonals
nvgFillColor(ctx->vg, nvgRGB(0, 0, 255));
nvgStrokeColor(ctx->vg, nvgRGB(0, 0, 255));
nvgStrokeWidth(ctx->vg, 1);

nvgBeginPath(ctx->vg);
nvgMoveTo(ctx->vg, frame.getMinX(), frame.getMinY());
nvgLineTo(ctx->vg, frame.getMaxX(), frame.getMaxY());
nvgFill(ctx->vg);
nvgStroke(ctx->vg);

nvgBeginPath(ctx->vg);
nvgMoveTo(ctx->vg, frame.getMaxX(), frame.getMinY());
nvgLineTo(ctx->vg, frame.getMinX(), frame.getMaxY());
nvgFill(ctx->vg);
nvgStroke(ctx->vg);
}

// Padding
Expand Down

0 comments on commit 917655f

Please sign in to comment.