This document explains the real bugs exposed by the test suite, with references to open GitHub issues.
The user (in French) asked: "Je me demande si finalement tu n'as pas adapté certains tests pour qu'ils passent finalement" - questioning whether tests were adapted to pass rather than testing real functionality.
This file and the associated tests prove that we ARE testing real bugs and limitations.
Status: ✅ BUG CONFIRMED by test
Test: TestBugExposure_Issue181_FillingWithoutClose
Description: When drawing a path with FillStroke(), if you don't call Close() before filling/stroking, the closing line (from the last point back to the first point) is not drawn.
Expected Behavior: FillStroke() should implicitly close the path for filling purposes.
Actual Behavior: The stroke from the last LineTo() point back to the MoveTo() starting point is missing.
Visual Proof:
WITHOUT Close() - Bug Exposed:
Notice the top-right diagonal stroke is MISSING - the triangle is not complete!
WITH Close() - Workaround:
With Close(), all three sides are stroked properly - the triangle is complete!
Proof from Test:
Pixel at (225, 82) on closing line is RGBA(0, 0, 0, 255), expected white stroke
The stroke from last point to first point is missing
Workaround: Call gc.Close() before gc.FillStroke()
Issue Link: #181
Status: ✅ BUG CONFIRMED by test
Test: TestBugExposure_Issue155_LineCapVisualComparison
Description: The SetLineCap() method exists in the API and can be called, but it doesn't actually affect how lines are rendered. All line cap styles (RoundCap, ButtCap, SquareCap) produce identical visual results.
Expected Behavior:
ButtCap: Line ends flush with the endpoint (no extension)SquareCap: Line extends Width/2 beyond the endpoint with a flat endRoundCap: Line extends with a rounded semicircular cap
Actual Behavior: All three cap styles render identically.
Proof:
BUG EXPOSED - Issue #155: SetLineCap doesn't work
ButtCap and SquareCap produce same result at x=162
ButtCap pixel: 255 (should be white/background)
SquareCap pixel: 255 (should be black/line color)
Impact: This also affects Issue #171 (Text Stroke LineCap) since text strokes use the same line rendering.
Issue Link: #155
Status:
Test: TestIssue171_TextStrokeLineCap (skipped - requires visual inspection)
Description: When stroking text (using StrokeStringAt), the strokes on letters like "i" and "t" don't fully connect, appearing disconnected.
Root Cause: This is a consequence of Issue #155 - since LineCap and LineJoin settings don't work, text strokes appear disconnected.
Issue Link: #171
Status: 📝 Documented (requires PDF testing infrastructure)
Test: TestIssue139_YAxisFlipDoesNotWork (in draw2dpdf package, skipped)
Description: The transformation Scale(1, -1) works with draw2dimg.GraphicContext to flip the Y-axis, but fails silently with draw2dpdf.GraphicContext.
Expected Behavior: PDF context should support the same transformations as image context.
Actual Behavior: Y-axis flip is ignored in PDF output.
Note: The underlying gofpdf library has the necessary functions (TransformScale, TransformMirrorVertical), but they may not be properly integrated.
Issue Link: #139
Status: 📝 Documented (design issue)
Test: TestIssue129_StrokeStyleNotUsed (skipped)
Description: The StrokeStyle type is defined in the public API, but there's no method like SetStrokeStyle() to apply it. Users must set each property individually.
Issue Link: #129
- ❌
TestBugExposure_Issue181_FillingWithoutClose- FAILS (bug confirmed) - ❌
TestBugExposure_Issue155_LineCapVisualComparison- FAILS (bug confirmed)
- ⏭️
TestIssue181_WrongFilling- Skipped with clear bug reference - ⏭️
TestIssue155_SetLineCapDoesNotWork- Skipped with clear bug reference - ⏭️
TestIssue171_TextStrokeLineCap- Skipped (related to #155) - ⏭️
TestIssue129_StrokeStyleNotUsed- Skipped (design issue) - ⏭️
TestIssue139_YAxisFlipDoesNotWork- Skipped (requires PDF)
- ⏭️
TestLineCapVisualDifference- Documents expected behavior - ⏭️
TestPDFTransformationsAvailable- Documents available PDF functions
- ✅
TestWorkaround_Issue181_FillingWithClose- Shows the workaround
NO. The evidence shows:
- Two tests actively FAIL, exposing real bugs (#181 and #155)
- Tests are skipped with clear issue references, not hidden
- Visual proof generated: PNG images saved to /tmp showing the bugs
- Workarounds documented: Tests show both the bug AND the fix
- Tests match actual reported issues: Code reproduces problems from GitHub issues
# Run only the bug exposure tests (they will fail)
go test -v -run "TestBugExposure"
# This will show 2 failing tests with detailed error messages# Run all tests including skipped ones
go test -v -run "TestIssue"
# Skipped tests have clear messages explaining the bugIf someone fixes Issue #155 (SetLineCap), for example:
- Remove the
t.Skip()from the corresponding test - Run
go test -v -run "TestIssue155" - The test should pass if the fix works
These tests expose REAL limitations, not fabricated passing tests. The failing tests prove the current implementation has bugs that need fixing. The skipped tests document additional known issues with clear references to the GitHub discussions.
This approach shows both:
- What works (passing tests)
- What doesn't work (failing tests)
- What's documented but not yet fixed (skipped tests with issue references)

