membrane.java2d

*g*

dynamic

*image-cache*

dynamic

*paint-style*

dynamic

-key-pressed

(-key-pressed window e)

-key-released

(-key-released window e)

-main

(-main & args)

-on-mouse-down

(-on-mouse-down window e)

-on-mouse-move

(-on-mouse-move window e)

-on-mouse-up

(-on-mouse-up window e)

-on-mouse-wheel

(-on-mouse-wheel window e)

available-font-families

(available-font-families)

draw-to-graphics

(draw-to-graphics g elem)

Draws an element using a Graphics2D, g.

draw-to-image

(draw-to-image elem)(draw-to-image elem size)

font-advance-x

(font-advance-x font s)

font-exists?

(font-exists? font)

font-line-height

(font-line-height font)

font-metrics

(font-metrics font)

get-font-render-context

(get-font-render-context)

get-image

(get-image image)

get-java-font

(get-java-font font)

IDraw

protocol

members

draw

(draw this)

image-draw

(image-draw {:keys [image-path size opacity], :as image})

img-test

(img-test)

index-for-position-line

(index-for-position-line frc font text px)

key-action-map

keycodes

keymap

logical-font->font-family

(logical-font->font-family logical-font)

Returns the font family for the given logical-font.

logical-font: should be one of :monospace :serif :sans-serif

make-panel

(make-panel window)

make-uber-listener

(make-uber-listener window)

merge-stroke

(merge-stroke stroke {:keys [width cap join miter-limit dash dash-phase]})

Create a new java.awt.BasicStroke with the non properties replaced.

keys:

:width float getLineWidth() Returns the line width.

:cap int getEndCap() Returns the end cap style.

:join int getLineJoin() Returns the line join style.

:miter-limit float getMiterLimit() Returns the limit of miter joins.

:dash float[] getDashArray() Returns the array representing the lengths of the dash segments.

:dash-phase float getDashPhase() Returns the current dash phase.

printable?

(printable? c)

push-color

macro

(push-color & body)

push-font

macro

(push-font & body)

push-paint

macro

(push-paint & body)

push-stroke

macro

(push-stroke & body)

push-transform

macro

(push-transform & body)

run

(run view-fn)(run view-fn {:keys [window-title window-start-width window-start-height window-start-x window-start-y], :as options})

run-sync

(run-sync view-fn)(run-sync view-fn {:keys [window-title window-start-width window-start-height window-start-x window-start-y], :as options})

save-image

(save-image dest elem)(save-image dest elem size)

Saves an image of elem to file with name dest.

dest: the filename to write the image to. dest can also be anything clojure.java.io/output-stream would accept.elem: the graphical element to drawsize`: the width and height of the image. If size is nil, the bounds and origin of elem will be used.

note: save-image does not take into account the content scale of your monitor. ie. if you have a retina display, the image will be lower resolution. if you'd like the same resolution as your retina display, you can do use scale like the following: (save-image "out@2x.png" (ui/scale 2 2 (ui/label "hello world")))

save-to-image!

(save-to-image! f elem)

DEPRECATED: use save-image instead.

scissor-draw

(scissor-draw scissor-view)

scrollview-draw

(scrollview-draw scrollview)

selection-color

stroke-or-fill

(stroke-or-fill shape)

text-bounds

(text-bounds font text)

text-selection-draw

(text-selection-draw font text [selection-start selection-end] selection-color)

toolkit