Skip to content

Conversation

@ekanshgupta2046
Copy link
Contributor

Description

Summary:

Implemented thin axis gridlines on the graph canvas that align with integer coordinates. Added adaptive grid spacing to prevent overcrowding at smaller zoom levels.

Details:
-> Added rendering logic for thin integer gridlines (light gray) on both axes.
-> Implemented adaptive spacing logic — gridline intervals dynamically increase when the zoom level is too small to keep visuals clean.
-> Updated graph rendering to maintain smooth performance even when zooming in or out.
-> Ensured the feature integrates with the existing SDL2 + ImGui rendering pipeline.

Testing:
-> Verified gridlines align with integer points.
-> Checked that lines don’t overcrowd at various zoom levels.
-> Confirmed smooth transitions during zoom in/out and function plotting.

Impact:
Improves graph readability and usability by providing clear, uncluttered grid visuals at all zoom scales.

Semver Changes

  • Patch (bug fix, no new features)
  • Minor (new features, no breaking changes)
  • Major (breaking changes)

Issues

closes #5

Checklist

Copy link
Member

@nsh07 nsh07 left a comment

Choose a reason for hiding this comment

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

Please resolve the 3 requests. Otherwise, your PR is perfect and I can merge it after you fix these 3. Thanks for contributing!

@nsh07 nsh07 merged commit dfd7990 into OPCODE-Open-Spring-Fest:main Oct 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Implement axis gridlines

2 participants