FunctionPackage: common-graphicsToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Minimally revised from 6.1

draw-arrowhead

Arguments: stream from-pos to-pos &key (length 20) (width 10) fill

draw-arrowhead draws a simple arrowhead at to-pos for a line that was drawn between from-pos and to-pos. Typically an application will first call draw-line to draw an actual line, and then call draw-arrowhead zero, one, or two times to optionally add arrowheads to either end of the line.

the arguments are:

Example

Here is an example function that draws arrows at various angles.

(defun test-arrowheads (&key (length 20)(width 10))
  (let* ((window (make-window :arrows
                   :class 'bitmap-window
                   :title "Arrowheads"
                   :interior (make-box 200 200 600 600)
                   :scrollbars nil))
         (pane (frame-child window))
         (center #.(make-position 200 200))
         coord side)
    (with-positions (pos1)
      (dotimes (j 9)
        (setq coord (+ 200 (* 40 (- j 4))))
        (dolist (fill (list nil t))
          (setq side (if fill 360 40))
          (nmake-position pos1 side coord)
          (draw-line pane center pos1)
          (draw-arrowhead pane center pos1 :fill fill
                          :length length :width width)
          (nmake-position pos1 coord side)
          (draw-line pane center pos1)
          (draw-arrowhead pane center pos1 :fill fill
                          :length length :width width))))))


Copyright (c) 1998-2002, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.2. This page has had minimal revisions compared to the 6.1 page.
Created 2002.2.26.

ToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.2
Minimally revised from 6.1