til-lang / til-blipt

An easy to use, intuitive and opinionated GUI library
MIT License
0 stars 0 forks source link

Command-oriented interface for 2D graphics etc. #1

Open dumblob opened 2 years ago

dumblob commented 2 years ago

I wonder whether you thought of architecturing the interface similarly to https://github.com/calebwin/stdg ?

I think such approach would fit Til perfectly.

Thoughts?

cleberzavadniak commented 2 years ago

Yeah, that was kind of my plan when I started the original Blipt! project. I'm happy to see that I'm not the only one who feels the need for something like that. My idea was more oriented to documents, though, and that is the plan for this current project.

cleberzavadniak commented 2 years ago

I want to add a screenshot to the README of the project and this seems to be the best place to host it. :-)

blipt

dumblob commented 2 years ago

Neat. You seem to have started with the most difficult part of UI - font rendering & manipulation. That is actually exactly the approach I would have taken myself!

From the source it feels a bit too bare bones but it does the job.

Do you plan a zoom feature? For me this would be an absolute necessity (I like to look at details on web pages etc. - but unlike web browsers I would prefer a zoom-follows-cursor behavior pretty much as any maps application do).

In addition to that if you also supported a default zoom value, then it could serve as DPI-awareness functionality on high-DPI displays (pretty common nowadays - incl. my screens :wink:) if the programmer would relate this default zoom to the resolution and physical dimensions of the screen(s).

cleberzavadniak commented 2 years ago

I'm not sure if "zoom" would be the right term, but scaling is reasonably easy to implement (I mean: scaling the document wouldn't guarantee everything is perfectly in the same proportion/relation/position as 1:1).

dumblob commented 2 years ago

If there will exist a (programmatical) easy way to enforce 1:1 scaling then I definitely agree with making the non-1:1 scaling (e.g. incl. text reflow) the default.

dumblob commented 2 years ago

Another take on event/command-oriented interface: https://github.com/gabrielrcouto/php-gui/blob/master/PROTOCOL.md