Implement tile_viewer.py with custom line width support for binary drawing commands #304
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new
tile_viewer.pymodule that provides functionality to process and render tiles from binary data (.bin files) with support for custom line widths in drawing commands.Overview
This implementation addresses the need to process binary tile data with enhanced line width support for LINE and POLYLINE drawing commands, while maintaining compatibility with existing LVGL binary image files used throughout the project.
Key Features
Dual Format Support
Custom Line Width Implementation
The
render_tile_surface()method now includes line width processing for drawing commands:Drawing Commands Supported
CMD_LINE: Draws lines between two points with custom line widthCMD_POLYLINE: Draws connected line segments with custom line widthCMD_RECT,CMD_CIRCLE,CMD_POLYGON: Use current line width for outlinesCMD_POINT: Renders points with size based on current line widthColor Format Support
Usage Example
Implementation Details
Testing
The implementation has been validated with:
This enhancement enables more sophisticated drawing capabilities while maintaining full compatibility with the existing IceNav-v3 graphics pipeline.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.