Comments (4)
I just wanted to note that I solved my need for geometric algorithms by implementing all of them in a brand new library written in pure Ruby called Perfect Shape.
That said, it is still useful to provide such algorithms in C libui, especially to software engineers from other programming languages who do not have an equivalent of Perfect Shape in their programming language of choice (or they could otherwise switch to Ruby and use Glimmer DSL for LibUI I suppose).
Cheers!
from libui.
I already started integrating the geometric algorithm library Perfect Shape into Glimmer DSL for LibUI.
And, it just occurred to me; there is a scenario that Perfect Shape cannot address, which is checking if a point is contained within a drawn Text on Area (though I could approximate it if I knew the font in advance). That requires font-dependent calculations, which libui does not currently offer.
SWT provides something called the textExtent that enables software engineers to check if a point is within the extent (size) of drawn Text (varying depending on configured font). It would be great if the libui C library could provide something similar to begin. But, it would be great if it can go even further than that and let software engineers know if a point is contained within the exact area occupied by the text Glyphs (e.g. point is within all the segments that make up the letter T). That way, I could implement a use-case (mentioned to me just yesterday by a user) of being able to detect if the user is pointing with the mouse at a specific drawn word of text and then change its color or highlight another related word in response.
It would be helpful to include such features in libui for better usage by software engineers and better service for customer needs.
Cheers!
from libui.
That requires font-dependent calculations, which libui does not currently offer.
SWT provides something called the textExtent that enables software engineers to check if a point is within the extent (size) of drawn Text (varying depending on configured font). It would be great if the libui C library could provide something similar to begin.
This is already implemented with uiDrawTextLayoutExtents()
, which does take the specified layout font into account.
from libui.
Ahh. Thanks for pointing that out.
To be honest, I thought extent support existed, but I quickly checked the Golang LibUI docs and didn’t find it there, so then I mistakenly concluded I was wrong about extent support existing in LibUI and commented here.
from libui.
Related Issues (20)
- Timer example doesn't compile HOT 1
- Crashes in example 'test'
- .
- .
- Language agnostic documentation for libui? Tutorial?
- [Feature request] .move() the main window/widget in a cross-platform manner
- Setting Custom Fonts on Controls
- Another C++ binding HOT 4
- Where is the Tutorial? HOT 2
- Key Location
- How to constrain area redrawing to clip region? HOT 1
- Questions about the table
- Aggregate "TODO" list - or hopeful TODO listing as-is HOT 8
- What's the object ownership model? HOT 5
- Is someone updating this repo but in another github repo/profile? HOT 20
- Glimmer DSL for LibUI Wins Fukuoka Ruby 2022 Special Award HOT 2
- <NOTE> Active fork `libui-ng` HOT 4
- MSYS will drop Windows 7; find an alternative to it for MinGW-w64 HOT 2
- macos m2 build fail HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libui.