FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version

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))))))

See also cg-drawing.htm.


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. This page was not revised from the 8.0 page.
Created 2009.9.22.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Unrevised from 8.0 to 8.1.
8.0 version