changeset 84:b04bdeec5700

English README.
author Mikhail Kryshen <mikhail@kryshen.net>
date Wed, 08 Sep 2010 04:40:05 +0400
parents b5bb0e16507d
children e718a69f7d99
files README.rst
diffstat 1 files changed, 34 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.rst	Wed Sep 08 04:40:05 2010 +0400
@@ -0,0 +1,34 @@
+=========
+ Indyvon
+=========
+
+Indyvon [INteractive DYnamic VisualizatiON] is an experimental GUI
+library for Clojure.
+
+It is based around the idea of basically stateless UI elements defined
+by the following simple protocol::
+
+  (defprotocol Layer
+    (render! [layer]
+      "Draws the layer.")
+    (layer-size [layer]
+      "Returns preferred size for the layer."))
+
+Layer functions are called in the Layer context which is defined by
+bindings to vars including:
+
+- ``*graphics*`` — an instance of java.awt.Graphics2D used for drawing;
+- ``*width*`` and ``*height*`` — size of the drawing bounds;
+- ``*clip*`` — clipping area (instance of java.awt.geom.Shape).
+
+In the ``render!`` function layer could draw using the provided
+Graphics2D instance, display another layers at the specified locations
+relative to it's own context, and register event handlers.
+
+Event dispatching is done by remembering the clipping areas and affine
+transforms of visible layer contexts after every repaint for the time
+until the rendering of the next frame is complete.
+
+It is possible to draw layers asynchronously in a separate thread by
+wrapping them in ``async-layer`` which uses two off-screen buffers
+(triple buffering) to avoid locking.