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

Increase vertical resolution with block pixels #2

Open
dmadisetti opened this issue Aug 2, 2023 · 2 comments
Open

Increase vertical resolution with block pixels #2

dmadisetti opened this issue Aug 2, 2023 · 2 comments

Comments

@dmadisetti
Copy link

Such an interesting project. Obvious do what you want, but using half blocks (▀) looks great in terminal (set fg and bg independently).

Example:

image

from arraypad/tui-image#3

@dmadisetti
Copy link
Author

Oh, quick look in the source and you are using blocks. Why is the pencil a full cursor position then?

@1j01
Copy link
Owner

1j01 commented Aug 6, 2023

The reason is simple; I would need a sub-cell mouse position in order to make it work sensibly. It would be strange and I imagine frustrating to be able to directly target only half of the pixels of an image, even if you could affect them indirectly with line/fill/brush tools. Pixel level mouse precision may be possible, however, as pointed out in issue #1 (comment)
I don't know how many terminals support this, or how it works with terminal zooming (changing pixels per cell).

For now, anyway, it keeps the project simpler just to treat character cells as character cells, and embrace aspect ratios as part of the terminal aesthetic.

You can add half blocks from the character palette, by double clicking the current color area, or paste in any Unicode characters you want (with varied results across terminals):

  • You can paste without creating a text box, in which case it will create a selection object (like a text box but not editable). If the text on the clipboard is too large, it will prompt to expand the document size.
  • If you use the Text tool, and create a text box, you can paste into it. If the text on the clipboard is too large, it will currently complain loudly, like good old MS Paint.
  • You can also paste into the current color/character area, which is an input, to draw with a given character, as an alternative to using the Color Picker tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants