Haiku BPolygon: Vertex Geometry, Mapping, and Safe Drawing
Construct Haiku BPolygon geometry from validated vertices, map coordinate frames safely, and draw closed shapes without stale bounds or ownership bugs.
tag
6 posts
Construct Haiku BPolygon geometry from validated vertices, map coordinate frames safely, and draw closed shapes without stale bounds or ownership bugs.
Avoid off-by-one drawing bugs with Haiku BRect inclusive edges, width semantics, invalid sentinels, intersections, and coordinate conversions.
Measure Haiku text with the active BFont, handle ascent and descent correctly, choose spacing modes, and avoid brittle character-width estimates.
Use Haiku BPicture as a recorded drawing-command stream, understanding attachment, child-view limits, data replacement, replay, and lifetime.
Use BView::Invalidate, Draw, update rectangles, and clipping regions as a retained redraw contract instead of painting transient pixels directly.
Make NSView rendering deterministic and efficient with dirty-region invalidation, opaque coverage, layer policies, coordinate discipline, and tests.