File: artist.el.html
What is artist?
---------------
Artist is an Emacs Lisp package that allows you to draw lines, rectangles and ellipses by using your mouse and/or keyboard. The shapes are made up with the ascii characters |, -, / and \.
Features are:
* Intersecting: When a | intersects with a -, a + is
drawn, like this: | \ /
--+-- X
| / \
* Rubber-banding: When drawing lines you can interactively see the
result while holding the mouse button down and moving the mouse. If
your machine is not fast enough (a 386 is a bit too slow, but a
Pentium is good enough), you can turn this feature off. You will
then see 1's and 2's which mark the 1st and 2nd endpoint of the line
you are drawing.
* Drawing operations: The following drawing operations are implemented:
lines straight-lines
rectangles squares
poly-lines straight poly-lines
ellipses circles
text (see-thru) text (overwrite)
spray-can setting size for spraying
vaporize line vaporize lines
erase characters erase rectangles
Straight lines are lines that go horizontally, vertically or
diagonally. Plain lines go in any direction. The operations in
the right column are accessed by holding down the shift key while
drawing.
It is possible to vaporize (erase) entire lines and connected lines
(rectangles for example) as long as the lines being vaporized are
straight and connected at their endpoints. Vaporizing is inspired
by the drawrect package by Jari Aalto <jari.aalto@poboxes.com>.
* Flood-filling: You can fill any area with a certain character by
flood-filling.
* Cut, copy and paste: You can cut, copy and paste rectangular
regions. Artist also interfaces with the rect package (this can be
turned off if it causes you any trouble) so anything you cut in
artist can be yanked with C-x r y and vice versa.
* Drawing with keys: Everything you can do with the mouse, you can
also do without the mouse.
* Arrows: After having drawn a (straight) line or a (straight)
poly-line, you can set arrows on the line-ends by typing < or >.
* Aspect-ratio: You can set the user option artist-aspect-ratio to
reflect the height-width ratio for the font you are using. Squares
and circles are then drawn square/round. Note, that once your
ascii-file is shown with font with a different height-width ratio,
the squares won't be square and the circles won't be round.
* Picture mode compatibility: Artist is picture mode compatible (this
can be turned off).
See the documentation for the function artist-mode(var)/artist-mode(fun) for a detailed
description on how to use artist.
What about adding my own drawing modes?
---------------------------------------
See the short guide at the end of this file. If you add a new drawing mode, send it to me, and I would gladly include in the next release!
Defined variables (44)
artist-arrows | A vector of characters to use as arrows. |
artist-aspect-ratio | Defines the character height-to-width aspect ratio. |
artist-borderless-shapes | When non-nil, draw shapes without border. |
artist-copy-buffer | Copy buffer. |
artist-curr-go | Current selected graphics operation. |
artist-default-fill-char | Char to use when a fill-char is required but none is set. |
artist-direction-info | Table used for stepping x and y coordinates in a specific direction. |
artist-draw-region-max-y | Line-number for bottom-most visited line for draw operation. |
artist-draw-region-min-y | Line-number for top-most visited line for draw operation. |
artist-ellipse-left-char | Character to use at the leftmost position when drawing narrow ellipses. |
artist-ellipse-right-char | Character to use at the rightmost position when drawing narrow ellipses. |
artist-erase-char | Char to use when erasing. |
artist-figlet-default-font | Default font for ‘figlet’. |
artist-figlet-list-fonts-command | Command to run to get list of available fonts. |
artist-figlet-program | Program to run for ‘figlet’. |
artist-fill-char | Char to use when filling. |
artist-fill-char-set | Boolean to tell whether user has set some char to use when filling. |
artist-first-char | Character to set at first point when not rubber-banding. |
artist-flood-fill-right-border | Right edge definition, used when flood-filling. |
artist-flood-fill-show-incrementally | Whether or not to incrementally update display when flood-filling. |
artist-interface-with-rect | Whether to interface with the rect package or not. |
artist-line-char | Char to use when drawing lines. |
artist-line-char-set | Boolean to tell whether user has set some char to use when drawing lines. |
artist-menu-map | Menu for ‘artist-mode’. |
artist-mode | Non-nil if Artist mode is enabled. |
artist-mode-hook | Hook run after entering or leaving ‘artist-mode’. |
artist-mode-map | Keymap for ‘artist-mode’. |
artist-mode-name | Name of Artist mode beginning with a space (appears in the mode-line). |
artist-mt | Master Table for ‘artist-mode’. |
artist-octant-info | Table used by line drawing algorithm (eight point). |
artist-picture-compatibility | Whether or not picture mode compatibility is on. |
artist-pointer-shape | If in X Windows, use this pointer shape while drawing with the mouse. |
artist-prev-next-op-alist | Assoc list for looking up next and/or previous draw operation. |
artist-replacement-table | Replacement table for ‘artist-replace-char’. |
artist-rubber-banding | Interactively do rubber-banding when non-nil. |
artist-second-char | Character to set at second point when not rubber-banding. |
artist-spray-chars | Characters ("color") to use when spraying. |
artist-spray-interval | Number of seconds between repeated spraying. |
artist-spray-new-char | Initial character to use when spraying. |
artist-spray-radius | Size of the area for spraying. |
artist-text-renderer | Function for doing text rendering. |
artist-text-renderer-function | Function for doing text rendering. |
artist-trim-line-endings | Whether or not to remove white-space at end of lines. |
artist-vaporize-fuzziness | How to vaporize lines that are cut off. |