Skip to content

A Crystal port of the Java implementation of the Cassowary constraint solving algorithm

License

Notifications You must be signed in to change notification settings

da1nerd/kiwi.cr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kiwi

GitHub release Build Status

A Crystal port of the Java implementation of the Cassowary constraint solving algorithm

In other words, this is an algorithm to calculate constraint based GUI layouts.

Installation

Add this to your application's shard.yml:

dependencies:
  kiwi:
    github: da1nerd/kiwi.cr

Usage

require "kiwi"

solver = Kiwi::Solver.new
x = Kiwi::Variable.new("x")
solver.add_constraint(x + 2 == 20)
solver.update_variables
puts x.value # => 18

Benchmark

crystal run --release spec/benchmark.cr

Contributing

  1. Fork it (https://github.com/da1nerd/kiwi.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • Joel - creator, maintainer

About

A Crystal port of the Java implementation of the Cassowary constraint solving algorithm

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy