PLplot: plarc.c File Reference

PLplot 5.15.0

Macros | Functions
plarc.c File Reference
`#include "plplotP.h"`

Go to the source code of this file.

## Macros
#define | CIRCLE_SEGMENTS ( PL_MAXPOLY - 1 )
#define | DEG_TO_RAD(x) ( ( x ) * M_PI / 180.0 )

## Functions
void | plarc_approx (PLFLT x, PLFLT y, PLFLT a, PLFLT b, PLFLT angle1, PLFLT angle2, PLFLT rotate, PLBOOL fill)
void | c_plarc (PLFLT x, PLFLT y, PLFLT a, PLFLT b, PLFLT angle1, PLFLT angle2, PLFLT rotate, PLBOOL fill)

## Detailed Description

Functions for drawing an arc.

Definition in file plarc.c.

## Macro Definition Documentation

## ◆ CIRCLE_SEGMENTS

#define CIRCLE_SEGMENTS ( PL_MAXPOLY - 1 )

Definition at line 28 of file plarc.c.

## ◆ DEG_TO_RAD

#define DEG_TO_RAD | ( |  | x | ) | ( ( x ) * M_PI / 180.0 )

Definition at line 29 of file plarc.c.

## Function Documentation

## ◆ c_plarc()

void c_plarc | ( | PLFLT | x,
|  | PLFLT | y,
|  | PLFLT | a,
|  | PLFLT | b,
|  | PLFLT | angle1,
|  | PLFLT | angle2,
|  | PLFLT | rotate,
|  | PLBOOL | fill
| ) |  |

Plot an Arc. Takes the following arguments:

x, y: x and y coordinates for the center of the arc

a, b: Radius of the arc's major and minor axes

angle1: Start angle (degrees)

angle2: End angle (degrees)

fill: Should the arc be filled

Parameters

  x | Center coordinate of the arc in x.
  y | Center coordinate of the arc in y.
  a | Radius of the arcs major axis.
  b | Radius of the arcs minor axis.
  angle1 | Start angle in degrees.
  angle2 | End angle in degrees.
  rotate | How much to rotate the arc?
  fill | Fill the arc.

Definition at line 141 of file plarc.c.

## ◆ plarc_approx()

void plarc_approx | ( | PLFLT | x,
|  | PLFLT | y,
|  | PLFLT | a,
|  | PLFLT | b,
|  | PLFLT | angle1,
|  | PLFLT | angle2,
|  | PLFLT | rotate,
|  | PLBOOL | fill
| ) |  |

Takes the same arguments, with the same units, as c_plarc below. This is the fallback function in the event that the output device does not have native support for drawing arcs.

Parameters

  x | Center coordinate of the arc in x.
  y | Center coordinate of the arc in y.
  a | Radius of the arcs major axis.
  b | Radius of the arcs minor axis.
  angle1 | Start angle in degrees.
  angle2 | End angle in degrees.
  rotate | How much to rotate the arc?
  fill | Fill the arc.

Definition at line 51 of file plarc.c.