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

ellipse-start-and-end

Arguments: center smaj-axis smin-axis smaj-axis-angle start-angle length-angle

This function may be used to find the x and y coordinates of the endpoints of an elliptical arc that was drawn (or might be drawn). This may be needed for example when drawing a pie chart where you need to draw an elliptical arc and then draw straight lines from its endpoints to the arc center.

The arguments should be the same as those passed to the functions draw-ellipse-arc, draw-ellipse-sector, and fill-ellipse-sector (excluding the initial stream argument to those functions).

ellipse-start-and-end returns four values:

  1. the x coordinate of the starting point
  2. the y coordinate of the starting point
  3. the x coordinate of the ending point
  4. the y coordinate of the ending point

This function may also be used along with draw-circle-arc, draw-circle-sector, and fill-circle-sector by passing the radius for both smaj-axis and smin-axis, and passing 0 for smaj-axis-angle.

Other calculations similar to the one performed by this function could be done by calling the Common Lisp trigonometry functions such as sin and cos. But note that the angle arguments to those functions are in radians, while angle arguments to Common Graphics functions are in degrees. To convert from degrees to radians, multiply degrees by the value returned by (/ (* 2.0 pi) 360.0). (That value is a double-float. Coerce it to a single-float if you wish to work with single-floats.)


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

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