Skip to content

Point and Polyline Vector Rendering – Polyline rendering - #107

Open
pmeems wants to merge 2 commits into
developmentfrom
phase-2-polyline-rendering
Open

pmeems wants to merge 2 commits into
developmentfrom
phase-2-polyline-rendering

Conversation

@pmeems

@pmeems pmeems commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

Motivation

Render LineString and multipart polyline layers through both ActiveX backends using the backend-neutral scene data delivered by Phase 1.

Design

  • GDI clips and strokes each scene part independently, including coordinates far outside the device range.
  • OpenGL reuses scene-localized polyline vertices in the existing GPU buffer cache and draws each part with a separate line strip.
  • ActiveX accepts polyline datasets while continuing to reject point layers until Phase 3.

Validation

  • CMake Debug | x64 build completed with no new Level 4 warnings.
  • All 618 non-interactive CTest cases passed.
  • No project-memory changes were needed.

The initial line appearance remains a fixed solid one-pixel stroke; configurable symbology is follow-up work.

- Render clipped multipart polylines through GDI

- Cache and draw polyline parts through OpenGL

- Accept polyline datasets and cover rendering regressions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 5, 2026 08:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Numerical-precision defects can misclip visible lines, collapse OpenGL segments, and upload infinite localized vertices without triggering a safe fallback.

3 open issues
What changed in this PR

Adds polyline rendering to the ActiveX layer using Core’s backend-neutral scene data; point layers remain unsupported.

Changes:

  • Draws independent polyline parts through GDI and OpenGL.
  • Enables ActiveX polyline loading and adds rendering tests.
  • Updates capability and architecture documentation.

Rendering precision issues need correction before merge. Builds and project tests were not run.

File Description
tests/​MapWinGIS.ActiveX.Tests/​VectorLayerRendererTests.cpp Tests clipping, multipart drawing, and buffer reuse.
tests/​MapWinGIS.ActiveX.Tests/​ActiveXActivationTests.cpp Tests polyline loading and point rejection.
src/​MapWinGIS.ActiveX/​ViewTransform.h Updates transform documentation.
src/​MapWinGIS.ActiveX/​VectorRenderBackend.h Documents polyline rendering modes.
src/​MapWinGIS.ActiveX/​VectorLayerRenderer.cpp Updates coordinator documentation.
src/​MapWinGIS.ActiveX/​OpenGlVectorLayerRenderer.h Documents OpenGL polyline support.
src/​MapWinGIS.ActiveX/​OpenGlVectorLayerRenderer.cpp Adds polyline drawing and GPU caching.
src/​MapWinGIS.ActiveX/​MapWinGISControl.h Updates control documentation.
src/​MapWinGIS.ActiveX/​MapWinGISControl.cpp Accepts polyline datasets.
src/​MapWinGIS.ActiveX/​GdiVectorLayerRenderer.h Documents clipping and independent parts.
src/​MapWinGIS.ActiveX/​GdiVectorLayerRenderer.cpp Adds clipped polyline strokes.
README.md Updates supported rendering capabilities.
docs/​TESTING.md Describes polyline test coverage.
docs/​ARCHITECTURE.md Documents backend polyline responsibilities.

Review effort: Balanced

- Clip GDI geometry in map space without losing viewport offsets

- Split or reject unsafe OpenGL polyline localization

- Cover distant clipping and precision regressions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings December 5, 2026 11:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved precision, clipping, and coordinate-overflow defects can hide valid line segments in OpenGL and GDI, undermining fallback rendering.

3 open issues
3 resolved since last review

Review effort: Balanced

Comment on lines +135 to +136
if (!IsFiniteCoordinate(ToDeviceX(point, transform, originX)) ||
!IsFiniteCoordinate(ToDeviceY(point, transform, originY)))
startBoundaryCoordinate,
endBoundaryCoordinate,
parameter);
const double residual = boundary - coordinateAtParameter;
Comment on lines +374 to +377
return std::isfinite(localized.x) &&
std::isfinite(localized.y) &&
origin.x + localized.x == point.x &&
origin.y + localized.y == point.y;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants