PURE. Verbs over GIMP layers and groups: find, create, insert, name,
visibility, opacity and offsets. Non-destructive by construction: nothing
here merges, clears or deletes; supersede is how a retry replaces a
layer (a new layer above it, the old one hidden).
PURE. Verbs over GIMP layers and groups: find, create, insert, name, visibility, opacity and offsets. Non-destructive by construction: nothing here merges, clears or deletes; `supersede` is how a retry replaces a layer (a new layer above it, the old one hidden).
(get-by-id id)The layer with id id, or nil.
The layer with id `id`, or nil.
(get-offsets layer)The Offsets of layer's top-left corner.
The `Offsets` of `layer`'s top-left corner.
(insert image layer {:keys [parent position] :or {position 0}})Insert layer into image under :parent (nil: top level) at
:position (default 0, the top). Answers the layer.
Insert `layer` into `image` under `:parent` (nil: top level) at `:position` (default 0, the top). Answers the layer.
(new-group image {:keys [name as] :or {as (quote hg-group)} :as opts})A new layer group in image, inserted at :position under :parent and
bound to :as (default hg-group). Answers its Ref.
A new layer group in `image`, inserted at `:position` under `:parent` and bound to `:as` (default `hg-group`). Answers its `Ref`.
(new-layer image
{:keys [name width height type opacity as]
:or {type :rgba opacity 100 as (quote hg-layer)}
:as opts})A new transparent layer in image, sized to the image unless :width and
:height say otherwise, inserted at :position under :parent and bound
to :as (default hg-layer). Answers its Ref.
A new transparent layer in `image`, sized to the image unless `:width` and `:height` say otherwise, inserted at `:position` under `:parent` and bound to `:as` (default `hg-layer`). Answers its `Ref`.
(set-name item item-name)Rename item. GIMP appends " #1" when the name is taken anywhere in the
image. Answers the item.
Rename `item`. GIMP appends " #1" when the name is taken anywhere in the image. Answers the item.
(set-offsets layer {:keys [x y]})Move layer so its top-left corner is at :x, :y. Answers the layer.
Move `layer` so its top-left corner is at `:x`, `:y`. Answers the layer.
(set-opacity layer opacity)Set layer's opacity, in percent. Answers the layer.
Set `layer`'s opacity, in percent. Answers the layer.
(set-visible item visible?)Show or hide item. Answers the item.
Show or hide `item`. Answers the item.
(supersede image old opts)The non-destructive retry: a new layer (NewLayer options, :parent and
:position ignored) directly above old in image, then old hidden.
Answers the new layer.
The non-destructive retry: a new layer (`NewLayer` options, `:parent` and `:position` ignored) directly above `old` in `image`, then `old` hidden. Answers the new layer.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |