membrane.toolkit
IToolkitFontAdvanceX
protocol
members
font-advance-x
(font-advance-x toolkit font s)
Returns the advance-x for font.
IToolkitFontExists
protocol
members
font-exists?
(font-exists? toolkit font)
Returns true if the font can be found by the toolkit.
IToolkitFontLineHeight
protocol
members
font-line-height
(font-line-height toolkit font)
Returns the line height for font.
IToolkitFontMetrics
protocol
members
font-metrics
(font-metrics toolkit font)
Returns the font metrics for font.
IToolkitLogicalFontFontFamily
protocol
members
logical-font->font-family
(logical-font->font-family toolkit logical-font)
Returns the font family for the given logical-font
.
logical-font
: should be one of :monospace :serif :sans-serif
IToolkitRun
protocol
members
run
(run toolkit view-fn)
(run toolkit view-fn options)
Run a user interface with view-fn
to draw.
view-fn
should be a 0 argument function that returns an object satisfying IDraw
.
view-fn
will be called for every repaint.
options
is a map with extra options. available options will depend on the specific toolkit.
IToolkitRunSync
protocol
members
run-sync
(run-sync toolkit view-fn)
(run-sync toolkit view-fn options)
Run a user interface synchronously with view-fn
to draw.
view-fn
should be a 0 argument function that returns an object satisfying IDraw
.
view-fn
will be called for every repaint.
options
is a map with extra options. available options will depend on the specific toolkit.
IToolkitSaveImage
protocol
members
save-image
(save-image toolkit dest elem)
(save-image toolkit dest elem [w h :as size])
Saves an image of elem to file with name dest
.
dest
: the filename to write the image to.
elem
: the graphical element to draw
size
: the width and height of the image. If size is nil, the bounds and origin of elem will be used.