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-arrowsA vector of characters to use as arrows.
artist-aspect-ratioDefines the character height-to-width aspect ratio.
artist-borderless-shapesWhen non-nil, draw shapes without border.
artist-copy-bufferCopy buffer.
artist-curr-goCurrent selected graphics operation.
artist-default-fill-charChar to use when a fill-char is required but none is set.
artist-direction-infoTable used for stepping x and y coordinates in a specific direction.
artist-draw-region-max-yLine-number for bottom-most visited line for draw operation.
artist-draw-region-min-yLine-number for top-most visited line for draw operation.
artist-ellipse-left-charCharacter to use at the leftmost position when drawing narrow ellipses.
artist-ellipse-right-charCharacter to use at the rightmost position when drawing narrow ellipses.
artist-erase-charChar to use when erasing.
artist-figlet-default-fontDefault font for ‘figlet’.
artist-figlet-list-fonts-commandCommand to run to get list of available fonts.
artist-figlet-programProgram to run for ‘figlet’.
artist-fill-charChar to use when filling.
artist-fill-char-setBoolean to tell whether user has set some char to use when filling.
artist-first-charCharacter to set at first point when not rubber-banding.
artist-flood-fill-right-borderRight edge definition, used when flood-filling.
artist-flood-fill-show-incrementallyWhether or not to incrementally update display when flood-filling.
artist-interface-with-rectWhether to interface with the rect package or not.
artist-line-charChar to use when drawing lines.
artist-line-char-setBoolean to tell whether user has set some char to use when drawing lines.
artist-menu-mapMenu for ‘artist-mode’.
artist-modeNon-nil if Artist mode is enabled.
artist-mode-hookHook run after entering or leaving ‘artist-mode’.
artist-mode-mapKeymap for ‘artist-mode’.
artist-mode-nameName of Artist mode beginning with a space (appears in the mode-line).
artist-mtMaster Table for ‘artist-mode’.
artist-octant-infoTable used by line drawing algorithm (eight point).
artist-picture-compatibilityWhether or not picture mode compatibility is on.
artist-pointer-shapeIf in X Windows, use this pointer shape while drawing with the mouse.
artist-prev-next-op-alistAssoc list for looking up next and/or previous draw operation.
artist-replacement-tableReplacement table for ‘artist-replace-char’.
artist-rubber-bandingInteractively do rubber-banding when non-nil.
artist-second-charCharacter to set at second point when not rubber-banding.
artist-spray-charsCharacters ("color") to use when spraying.
artist-spray-intervalNumber of seconds between repeated spraying.
artist-spray-new-charInitial character to use when spraying.
artist-spray-radiusSize of the area for spraying.
artist-text-rendererFunction for doing text rendering.
artist-text-renderer-functionFunction for doing text rendering.
artist-trim-line-endingsWhether or not to remove white-space at end of lines.
artist-vaporize-fuzzinessHow to vaporize lines that are cut off.

Defined functions (300)

artist--adjust-x(X)
artist-2point-get-endpoint1(OBJ)
artist-2point-get-endpoint2(OBJ)
artist-2point-get-shapeinfo(OBJ)
artist-arrow-point-get-direction(ARROW-POINT)
artist-arrow-point-get-marker(ARROW-POINT)
artist-arrow-point-get-orig-char(ARROW-POINT)
artist-arrow-point-get-state(ARROW-POINT)
artist-arrow-point-set-state(ARROW-POINT NEW-STATE)
artist-arrows()
artist-backward-char(&optional N)
artist-calculate-new-char(LAST-COORD NEW-COORD)
artist-calculate-new-chars(POINT-LIST)
artist-charlist-to-string(CHAR-LIST)
artist-clear-arrow-points()
artist-clear-buffer(BUF)
artist-compute-key-compl-table(MENU-TABLE)
artist-compute-line-char()
artist-compute-popup-menu-table(MENU-TABLE)
artist-compute-popup-menu-table-sub(MENU-TABLE)
artist-compute-up-event-key(EV)
artist-coord-add-new-char(COORD NEW-CHAR)
artist-coord-add-saved-char(COORD SAVED-CHAR)
artist-coord-get-new-char(COORD)
artist-coord-get-saved-char(COORD)
artist-coord-get-x(COORD)
artist-coord-get-y(COORD)
artist-coord-set-new-char(COORD NEW-CHAR)
artist-coord-set-x(COORD NEW-X)
artist-coord-set-y(COORD NEW-Y)
artist-coord-win-to-buf(COORD)
artist-copy-generic(X1 Y1 X2 Y2)
artist-copy-rect(RECT X1 Y1 X2 Y2)
artist-copy-square(SQUARE X1 Y1 X2 Y2)
artist-current-column()
artist-current-line()
artist-cut-rect(RECT X1 Y1 X2 Y2)
artist-cut-square(SQUARE X1 Y1 X2 Y2)
artist-direction-char(DIRECTION)
artist-direction-step-x(DIRECTION)
artist-direction-step-y(DIRECTION)
artist-do-nothing()
artist-down-mouse-1(EV)
artist-down-mouse-3(EV)
artist-draw-circle(X1 Y1 X2 Y2)
artist-draw-ellipse(X1 Y1 X2 Y2)
artist-draw-ellipse-general(X1 Y1 X-RADIUS Y-RADIUS)
artist-draw-ellipse-with-0-height(X1 Y1 X-RADIUS Y-RADIUS)
artist-draw-line(X1 Y1 X2 Y2)
artist-draw-rect(X1 Y1 X2 Y2)
artist-draw-region-reset()
artist-draw-region-trim-line-endings(MIN-Y MAX-Y)
artist-draw-sline(X1 Y1 X2 Y2)
artist-draw-square(X1 Y1 X2 Y2)
artist-eight-point(X1 Y1 X2 Y2)
artist-ellipse-compute-fill-info(POINT-LIST)
artist-ellipse-fill-info-add-center(X-CENTER Y-CENTER FILL-INFO)
artist-ellipse-generate-quadrant(X-RADIUS Y-RADIUS)
artist-ellipse-mirror-quadrant(POINT-LIST)
artist-ellipse-point-list-add-center(X-CENTER Y-CENTER POINT-LIST)
artist-ellipse-remove-0-fills(FILL-INFO)
artist-endpoint-get-x(ENDPOINT)
artist-endpoint-get-y(ENDPOINT)
artist-erase-char(X1 Y1)
artist-erase-rect(RECT X1 Y1 X2 Y2)
artist-event-is-shifted(EV)
artist-fc-get-fn(INFO-PART)
artist-fc-get-fn-from-symbol(SYMBOL)
artist-fc-get-keyword(INFO-PART)
artist-fc-get-symbol(INFO-PART)
artist-fc-retrieve-from-symbol(SYMBOL RETRIEVE-FN)
artist-fc-retrieve-from-symbol-sub(TABLE SYMBOL RETRIEVE-FN)
artist-ff-get-rightmost-from-xy(X Y)
artist-ff-is-bottommost-line(X Y)
artist-ff-is-topmost-line(X Y)
artist-ff-too-far-right(X)
artist-figlet(TEXT)
artist-figlet-choose-font()
artist-figlet-get-extra-args()
artist-figlet-get-font-list()
artist-figlet-get-font-list-windows()
artist-figlet-run(TEXT FONT EXTRA-ARGS)
artist-file-to-string(FILE-NAME)
artist-fill-circle(ELLIPSE X Y X-RADIUS Y-RADIUS)
artist-fill-ellipse(ELLIPSE X Y X-RADIUS Y-RADIUS)
artist-fill-item-get-width(FILL-ITEM)
artist-fill-item-get-x(FILL-ITEM)
artist-fill-item-get-y(FILL-ITEM)
artist-fill-item-set-width(FILL-ITEM NEW-WIDTH)
artist-fill-item-set-x(FILL-ITEM NEW-X)
artist-fill-item-set-y(FILL-ITEM NEW-Y)
artist-fill-rect(RECT X1 Y1 X2 Y2)
artist-fill-square(SQUARE X1 Y1 X2 Y2)
artist-find-direction(X1 Y1 X2 Y2)
artist-find-octant(X1 Y1 X2 Y2)
artist-flood-fill(X1 Y1)
artist-forward-char(&optional N)
artist-funcall(FN &rest ARGS)
artist-get-buffer-contents-at-xy(X Y WIDTH)
artist-get-char-at-xy(X Y)
artist-get-char-at-xy-conv(X Y)
artist-get-dfdx-init-coeff(OCTANT)
artist-get-dfdy-init-coeff(OCTANT)
artist-get-first-non-nil-op(OP-LIST)
artist-get-last-non-nil-op(OP-LIST &optional LAST-NON-NIL)
artist-get-replacement-char(C)
artist-get-x-step-q<0(OCTANT)
artist-get-x-step-q>=0(OCTANT)
artist-get-y-step-q<0(OCTANT)
artist-get-y-step-q>=0(OCTANT)
artist-go-get-arrow-pred(INFO-VARIANT-PART)
artist-go-get-arrow-pred-from-symbol(SYMBOL)
artist-go-get-arrow-set-fn(INFO-VARIANT-PART)
artist-go-get-arrow-set-fn-from-symbol(SYMBOL)
artist-go-get-desc(INFO-PART)
artist-go-get-draw-fn(INFO-VARIANT-PART)
artist-go-get-draw-fn-from-symbol(SYMBOL)
artist-go-get-draw-how(INFO-VARIANT-PART)
artist-go-get-draw-how-from-symbol(SYMBOL)
artist-go-get-exit-fn(INFO-VARIANT-PART)
artist-go-get-exit-fn-from-symbol(SYMBOL)
artist-go-get-fill-fn(INFO-VARIANT-PART)
artist-go-get-fill-fn-from-symbol(SYMBOL)
artist-go-get-fill-pred(INFO-VARIANT-PART)
artist-go-get-fill-pred-from-symbol(SYMBOL)
artist-go-get-init-fn(INFO-VARIANT-PART)
artist-go-get-init-fn-from-symbol(SYMBOL)
artist-go-get-interval-fn(INFO-VARIANT-PART)
artist-go-get-interval-fn-from-symbol(SYMBOL)
artist-go-get-keyword(INFO-VARIANT-PART)
artist-go-get-keyword-from-symbol(SYMBOL)
artist-go-get-mode-line(INFO-VARIANT-PART)
artist-go-get-mode-line-from-symbol(SYMBOL)
artist-go-get-prep-fill-fn(INFO-VARIANT-PART)
artist-go-get-prep-fill-fn-from-symbol(SYMBOL)
artist-go-get-shifted(INFO-PART)
artist-go-get-symbol(INFO-VARIANT-PART)
artist-go-get-symbol-shift(SYMBOL IS-SHIFTED)
artist-go-get-symbol-shift-sub(TABLE SYMBOL IS-SHIFTED)
artist-go-get-undraw-fn(INFO-VARIANT-PART)
artist-go-get-undraw-fn-from-symbol(SYMBOL)
artist-go-get-unshifted(INFO-PART)
artist-go-retrieve-from-symbol(SYMBOL RETRIEVE-FN)
artist-go-retrieve-from-symbol-sub(TABLE SYMBOL RETRIEVE-FN)
artist-intersection-char(NEW-C OLD-C)
artist-is-in-op-list-p(OP OP-LIST)
artist-key-do-continously-1point(X Y)
artist-key-do-continously-2points(X Y)
artist-key-do-continously-common()
artist-key-do-continously-continously(X Y)
artist-key-do-continously-poly(X Y)
artist-key-do-continuously-1point(X Y)
artist-key-do-continuously-2points(X Y)
artist-key-do-continuously-common()
artist-key-do-continuously-continuously(X Y)
artist-key-do-continuously-poly(X Y)
artist-key-draw-1point(X Y)
artist-key-draw-2points(X Y)
artist-key-draw-common()
artist-key-draw-continously(X Y)
artist-key-draw-continuously(X Y)
artist-key-draw-poly(X Y)
artist-key-set-point(&optional ARG)
artist-key-set-point-1point(X Y)
artist-key-set-point-2points(X Y)
artist-key-set-point-common(ARG)
artist-key-set-point-continously(X Y)
artist-key-set-point-continuously(X Y)
artist-key-set-point-poly(X Y &optional THIS-IS-LAST-POINT)
artist-key-undraw-1point(X Y)
artist-key-undraw-2points(X Y)
artist-key-undraw-common()
artist-key-undraw-continously(X Y)
artist-key-undraw-continuously(X Y)
artist-key-undraw-poly(X Y)
artist-make-2point-object(ENDPOINT1 ENDPOINT2 SHAPEINFO)
artist-make-arrow-point(X Y DIRECTION &optional STATE)
artist-make-endpoint(X Y)
artist-make-prev-next-op-alist(OP-LIST &optional LAST-NON-NIL-ARG FIRST-NON-NIL-ARG PREV-ENTRY PREV-OP-ARG)
artist-menu-map(ARG1)
artist-mn-get-items(INFO-PART)
artist-mn-get-title(INFO-PART)
artist-mode(&optional ARG)
artist-mode-exit()
artist-mode-init()
artist-mode-line-show-curr-operation(IS-DRAWING)
artist-mode-off()
artist-modify-new-chars(POINT-LIST)
artist-mouse-choose-operation(EV OP)
artist-mouse-draw-1point(EV)
artist-mouse-draw-2points(EV)
artist-mouse-draw-continously(EV)
artist-mouse-draw-continuously(EV)
artist-mouse-draw-poly(EV)
artist-move-to-xy(X Y)
artist-mt-get-info-part(ELEMENT)
artist-mt-get-symbol-from-keyword(KWD)
artist-mt-get-symbol-from-keyword-sub(TABLE KWD)
artist-mt-get-tag(ELEMENT)
artist-new-coord(X Y &optional NEW-CHAR)
artist-new-fill-item(X Y WIDTH)
artist-next-line(&optional N)
artist-nil()
artist-no-arrows()
artist-no-rb-set-point1(X Y)
artist-no-rb-set-point2(X Y)
artist-no-rb-unset-point1()
artist-no-rb-unset-point2()
artist-no-rb-unset-points()
artist-paste(X Y)
artist-pen(X1 Y1)
artist-pen-line(X1 Y1)
artist-pen-reset-last-xy(X1 Y1)
artist-pen-set-arrow-points(X1 Y1)
artist-previous-line(&optional N)
artist-put-pixel(POINT-LIST X Y)
artist-rect-corners-squarify(X1 Y1 X2 Y2)
artist-replace-char(NEW-CHAR)
artist-replace-chars(NEW-CHAR COUNT)
artist-replace-string(STRING &optional SEE-THRU)
artist-save-chars-under-point-list(POINT-LIST)
artist-save-chars-under-sline(LINE)
artist-select-erase-char(C)
artist-select-fill-char(C)
artist-select-line-char(C)
artist-select-next-op-in-list()
artist-select-op-circle()
artist-select-op-copy-rectangle()
artist-select-op-copy-square()
artist-select-op-cut-rectangle()
artist-select-op-cut-square()
artist-select-op-ellipse()
artist-select-op-erase-char()
artist-select-op-erase-rectangle()
artist-select-op-flood-fill()
artist-select-op-line()
artist-select-op-paste()
artist-select-op-pen-line()
artist-select-op-poly-line()
artist-select-op-rectangle()
artist-select-op-spray-can()
artist-select-op-spray-set-size()
artist-select-op-square()
artist-select-op-straight-line()
artist-select-op-straight-poly-line()
artist-select-op-text-overwrite()
artist-select-op-text-see-thru()
artist-select-op-vaporize-line()
artist-select-op-vaporize-lines()
artist-select-operation(OP-STR)
artist-select-prev-op-in-list()
artist-select-spray-chars(CHARS INITIAL-CHAR)
artist-set-arrow-points-for-2points(SHAPE X1 Y1 X2 Y2)
artist-set-arrow-points-for-poly(POINT-LIST)
artist-set-pointer-shape(NEW-POINTER-SHAPE)
artist-shift-has-changed(SHIFT-STATE EV)
artist-sline(X1 Y1 X2 Y2)
artist-spray(X1 Y1)
artist-spray-clear-circle(CIRCLE X1 Y1 X2 Y2)
artist-spray-get-interval()
artist-spray-random-points(N RADIUS)
artist-spray-set-radius(CIRCLE X1 Y1 X2 Y2)
artist-straight-calculate-length(DIRECTION X1 Y1 X2 Y2)
artist-string-split(STR R)
artist-string-to-charlist(STR)
artist-string-to-file(STR FILE-NAME)
artist-submit-bug-report()
artist-system(PROGRAM STDIN &optional PROGRAM-ARGS)
artist-t()
artist-t-if-fill-char-set()
artist-text-insert-common(X Y TEXT SEE-THRU)
artist-text-insert-overwrite(X Y TEXT)
artist-text-insert-see-thru(X Y TEXT)
artist-text-overwrite(X Y)
artist-text-see-thru(X Y)
artist-toggle-borderless-shapes(&optional STATE)
artist-toggle-first-arrow()
artist-toggle-rubber-banding(&optional STATE)
artist-toggle-second-arrow()
artist-toggle-trim-line-endings(&optional STATE)
artist-undraw-circle(ELLIPSE)
artist-undraw-ellipse(ELLIPSE)
artist-undraw-line(LINE)
artist-undraw-rect(RECTANGLE)
artist-undraw-sline(LINE)
artist-undraw-square(SQUARE)
artist-unintersection-char(LINE-C BUFFER-C)
artist-uniq(ARG &rest ARGS)
artist-update-display()
artist-update-pointer-shape()
artist-vap-find-endpoint(X1 Y1 STEP-X STEP-Y ACCEPT-SET REJECT-SET)
artist-vap-find-endpoints(X Y)
artist-vap-find-endpoints-horiz(X Y)
artist-vap-find-endpoints-nwse(X Y)
artist-vap-find-endpoints-swne(X Y)
artist-vap-find-endpoints-vert(X Y)
artist-vap-group-in-pairs(L)
artist-vaporize-by-endpoints(ENDPOINT1 ENDPOINT2)
artist-vaporize-line(X1 Y1)
artist-vaporize-lines(X1 Y1)

Defined faces (0)