Inkycal
Inkycal copied to clipboard
[FEATURE]: defining borders around the content, rendering Inkycal on an area smaller than the full panel
Is your feature request related to a problem? Please describe. Inkycal assumes the full e-ink panel is useable and visible.
However, when put in a standard picture frame, a significant section around the panel can be hidden : for instance, this happens when using a 7.5in panel with 5*7 Ikea photo frame as its cut-out is smaller than the screen. There are certainly other uses cases.
The new feature is about defining a useable area that is smaller than the panel, i.e. defining borders around the content and rendering it at the appropriate position.
Describe the solution you'd like
- add 4 parameters in settings.json to define the widths of the 4 border strips (
frame_border_x1, etc... in pixels) - modify the web-ui to calculate the module sizes, accounting for the smaller useable area
- make minimal changes in the Inkycal code to assemble the modules in the useable area
- add a step to paste the useable area to final full-size image before it is rendered onto the panel
nota :
- the setting names
frame_border_width_left,frame_border_width_right,frame_border_height_top,frame_border_height_bottomare added to settings.json - there are 4 values as it is not assumed that the useable area is centered on panel
- the padding at the module-level is still available.
- this feature can easily made backwards-compatible : if the 4 new settigns are absent from settings.json, the border widths/heights default to 0 and the image is rendered as in the current version.
Describe alternatives you've considered Currently, one way to address the problem is to use padding x-axis and padding y-axis. This creates a border in each module. While it is workable, this solution does not apply to the debug section (and its PiSugar info) and has to implemented in each module.
Additional context This addresses [FEATURE]: image module -> allow max width in percent #354
Example
draft image - asymmetric borders shozn in red as an highlight
"frame_border_width_left" : 20, "frame_border_width_right" : 40, "frame_border_height_top" : 10, "frame_border_height_bottom" : 50, in the settings.json, on a 800*480 panel.
@aceisace : probably a stupid question ;-) ... Where is the code for the web-ui ? (I did not find it in the repo... I guess I am missing something ... )
Thanks for the PR! Will get back to this and your PR in a few days. The code for the web-ui is not (yet) public. However, I can adapt the code if any changes are needed 👍
Marking this issue as stale due to inactivity
Marking this issue as stale due to inactivity
Marking this issue as stale due to inactivity
Marking this issue as stale due to inactivity