aboutsummaryrefslogtreecommitdiff
path: root/sixel.h (follow)
Commit message (Collapse)AuthorAgeLines
* sixel: refactor handling of wrap-around delete- and split regionsDaniel Eklöf2020-06-27-2/+3
| | | | | | | | | Handle these on a higher abstraction level. The low level functions that detect sixel intersections now assume the specified rectangle (or line region) does *not* cross the wrap-around. This is ensured by detecting a wrap-around region before hand, and splitting it up into two, non wrapping regions.
* sixel: add sixel_split_by_rectangle()Daniel Eklöf2020-06-27-1/+0
| | | | | | | | | This function splits a sixel image into up to four pieces. The four pieces correspond to the relative complement (set difference) of the sixel image and the specified rectangle. Use this function when (possibly) overwriting existing sixel images when generating a new one, i.e. in sixel_unhook().
* sixel: wip: split up image being overwritten, rather than erasing itDaniel Eklöf2020-06-23-0/+1
| | | | | | | | | | Instead of completely erasing a sixel image when it is being "overwritten" (text is printed somewhere within the image, or another sixel image is emitted within the first image), split it up into up to four pieces: 'above', 'below', 'to-the-left' and 'to-the-right'. This is currently very un-optimized, but seems to produce correct results.
* sixel: do not reset palette after each imageDaniel Eklöf2020-06-10-0/+2
| | | | | | | | A client can re-use the palette between images. Resetting the palette breaks this. Now we initialize the palette on demand, and resets it when the palette size is changed (by the client).
* sixel: add sixel_delete_at_row and sixel_delete_in_rangeDaniel Eklöf2020-02-24-0/+3
| | | | | These are utility functions to erase sixel images that are at the specified row, or in a row range.
* sixel: rename: purge_at_cursor() -> delete_at_cursor()Daniel Eklöf2020-02-22-1/+1
|
* sixel: purge images at current cursor rowDaniel Eklöf2020-02-22-0/+1
| | | | | When printing a character, or starting a new sixel image, purge all images that cover the cursor's current row.
* sixel: application configurable image max width/heightDaniel Eklöf2020-02-22-0/+5
|
* sixel: application configurable palette size (color count)Daniel Eklöf2020-02-22-0/+7
| | | | | This implements the CSI escapes for retrieving and (re)setting the palette size.
* sixel: add sixel_destroy()Daniel Eklöf2020-02-21-0/+2
|
* sixel: initial supportDaniel Eklöf2020-02-21-0/+7
This implements basic parsing of sixel data. Lots of limitations and temporary solutions as this is still work-in-progress: * Maximum image size hardcoded to 800x800 * No HLS color format support * Image is always rendered at 0x0 in the terminal