aboutsummaryrefslogtreecommitdiffstats
path: root/lay/strain/solve.go
Commit message (Collapse)AuthorAgeFilesLines
* lay/strain: wrap Solver in private structSam Anthony4 days1-70/+80
| | | | Reduces the number of args passed to private functions.
* lay/strain: replace Solver mutex with channelsSam Anthony4 days1-96/+151
| | | | | | | | | Partially reverts 483236742ddcd7883b5f9cff92244129274aa79c. Solver still closes itself automatically, but reverted to using request/reply channels. Mutex was becoming annoying to manage, as expected. TODO: TestRows fails intermittently due to constraint channels not being flushed when Solve() is called.
* lay/strain: add default constraints to SolverSam Anthony12 days1-16/+55
|
* lay/strain: remove TODOSam Anthony12 days1-1/+0
| | | | | Decided it's better to log an error and continue rather than abort early.
* lay/strain: simplify Solver internal synchronizationSam Anthony12 days1-114/+83
| | | | | | | | Replaced the AddConstraint() and Solve() methods' request/reply channels, used a mutex instread. Solver now closes the fieldConstrs channel automatically; removed the Close() method. Generally tidied up.
* lay/strain: represent rectangles as (origin, size)Sam Anthony12 days1-20/+20
|
* fix compiler errorsSam Anthony12 days1-4/+4
|
* create lay/strain packageSam Anthony13 days1-0/+276
The lay/strain package uses the Cassowary algorithm to solve systems of layout constraints.