Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cell background interpolation as SGR attribute #165

Open
o-sdn-o opened this issue Jan 21, 2022 · 0 comments
Open

Cell background interpolation as SGR attribute #165

o-sdn-o opened this issue Jan 21, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request GUI Terminal Built-in terminal emulator
Milestone

Comments

@o-sdn-o
Copy link
Collaborator

o-sdn-o commented Jan 21, 2022

A special case of #164 when the background (or image fragment) consists of only one pixel (RGBA color)

struct cell
{
  // Neighbor cells
  //    c0 c1
  //    c2
  //
  // BG interpolation type (two 1-bit values):
  // 0 -- None
  // 1 -- Cubic
  //
  // 0 1
  // │ └────── interpolation type between `c0` and `c2`
  // └──────── interpolation type between `c0` and `c1`

  byte interpolation_vector : 2;
  ...
  rgba fg;
  rgba bg;
  ... other cell data;
};

This attribute specified using additional subparameter (default=0) when background color is set

Examples:

CSI 41 : ⟨interpolation_vector⟩ m
CSI 48 : 2 : ⟨r⟩ : ⟨g⟩ : ⟨b⟩ : ⟨interpolation_vector⟩ m

Region without background interpolation (nearest neighbor)
vtm_nearest_neighbor_bg

Region with bicubic background interpolation (I drew in a graphic editor)
vtm_bicubic_neighbor_bg

@o-sdn-o o-sdn-o added the enhancement New feature or request label Jan 21, 2022
@o-sdn-o o-sdn-o self-assigned this Jan 21, 2022
@o-sdn-o o-sdn-o added GUI enhancement New feature or request and removed enhancement New feature or request labels Jan 23, 2022
@o-sdn-o o-sdn-o added the Terminal Built-in terminal emulator label Feb 3, 2022
@o-sdn-o o-sdn-o changed the title [Term] Support background interpolation SGR attribute Cell background interpolation as SGR attribute May 23, 2023
@o-sdn-o o-sdn-o added this to the Icebox ❄ milestone May 23, 2023
@o-sdn-o o-sdn-o closed this as completed May 23, 2023
@o-sdn-o o-sdn-o reopened this Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GUI Terminal Built-in terminal emulator
Projects
None yet
Development

No branches or pull requests

1 participant