diff options
author | Minijackson <minijackson@riseup.net> | 2023-02-03 19:59:43 +0100 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2023-02-03 19:59:43 +0100 |
commit | 82ffe3187a32bad4ecca0736882a23793a800822 (patch) | |
tree | 2d3ab9231b76dadcf2ab69b27053df6cc66bead1 /lua-bindings/diaphragm.lua | |
parent | c8bb3e4a24ca1ca6ec1a57c9e8cd8655483b3eb0 (diff) | |
download | diaphragm-82ffe3187a32bad4ecca0736882a23793a800822.tar.gz diaphragm-82ffe3187a32bad4ecca0736882a23793a800822.zip |
add support for images, and some chores
- SVG files not yet supported
- Remove dead commented code
- Add inherent constraints for text, path, and images
- Formatting
Diffstat (limited to 'lua-bindings/diaphragm.lua')
-rw-r--r-- | lua-bindings/diaphragm.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lua-bindings/diaphragm.lua b/lua-bindings/diaphragm.lua index a308c28..d4e3dc9 100644 --- a/lua-bindings/diaphragm.lua +++ b/lua-bindings/diaphragm.lua | |||
@@ -1,3 +1,5 @@ | |||
1 | -- TODO: split file | ||
2 | |||
1 | local M = {} | 3 | local M = {} |
2 | 4 | ||
3 | M.core = require("libdiaphragm") | 5 | M.core = require("libdiaphragm") |
@@ -184,6 +186,15 @@ function M.straight_path.new(params) | |||
184 | return result | 186 | return result |
185 | end | 187 | end |
186 | 188 | ||
189 | M.image = {} | ||
190 | |||
191 | function M.image.new(params) | ||
192 | params = params or {} | ||
193 | local result = M.core.image(params) | ||
194 | M.util.tbl_assign_reserved(params, result, bounds_reserved) | ||
195 | return result | ||
196 | end | ||
197 | |||
187 | function M.shape(params) | 198 | function M.shape(params) |
188 | params = params or {} | 199 | params = params or {} |
189 | 200 | ||