Skip to content

Commit 9033865

Browse files
committed
Remove stroke width limit from nanovg
1 parent 47e7aad commit 9033865

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

test/lines.png

-208 Bytes
Loading

test/lines_hq.png

-998 Bytes
Loading

test/penlayer/penlayer_test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,11 @@ TEST_F(PenLayerTest, DrawLine)
315315
penLayer.drawLine(attr, 130, 77, 125, -22);
316316

317317
attr.color = QNanoColor(0, 128, 0, 128);
318-
attr.diameter = 10;
318+
attr.diameter = 225;
319+
320+
penLayer.drawLine(attr, -225, 25, -175, -25);
319321

320-
penLayer.drawLine(attr, 152, -158, -228, 145);
322+
attr.diameter = 10;
321323
penLayer.drawLine(attr, -100, 139, 20, 72);
322324

323325
attr.color = QNanoColor(255, 50, 200, 185);

thirdparty/libqnanopainter/nanovg/nanovg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2345,7 +2345,7 @@ void nvgStroke(NVGcontext* ctx)
23452345
{
23462346
NVGstate* state = nvg__getState(ctx);
23472347
float scale = nvg__getAverageScale(state->xform);
2348-
float strokeWidth = nvg__clampf(state->strokeWidth * scale, 0.0f, 200.0f);
2348+
float strokeWidth = state->strokeWidth * scale;
23492349
NVGpaint strokePaint = state->stroke;
23502350
const NVGpath* path;
23512351
int i;

0 commit comments

Comments
 (0)