File x/Subpath


class x.Subpath

Inherits

State supers
tom.State

variables

const OPCODE_MOVETO = 1;
Subpath opcodes. The numbers are identical to PostScript encoded user paths.
const OPCODE_LINETO = 3;
const OPCODE_RLINETO = 4;
const OPCODE_CURVETO = 5;
const OPCODE_RCURVETO = 6;

instance x.Subpath

variables

pointer coordinates;
The coordinates in this path. Elements are (C) floats.
int coords_num;
Number of coordinates (2 elements) in and the capacity (in coordinates) of the coordinates array.
int coords_cap;
pointer actions;
The actions. Elements are (C) chars.
int actions_num;
The number of actions and the maximum capacity of the actions array.
int actions_cap;
int num_curves;
The number of curves in this subpath.
public boolean closed;
Iff TRUE, this path is closed.

methods

id
  init (float, float) (x, y);
Designated initializer. The given point is the first (and only and mandatory) moveto of this subpath.

void
  curveto (float, float, float, float, float, float) (x1, y1, x2, y2, x3, y3);
Undocumented.

id (result)
  flattened;
Undocumented.

void
  lineto (float, float) (x, y);
Undocumented.

void
  moveto (float, float) (x, y)
pre
  !actions_num;
Undocumented.

void
  newpath;
Convenience method to re-used the storage offered by this path.

(float, float, float, float) (x1, y1, x2, y2)
  pathbbox;
Return the bounding box of all coordinates in the receiving path.

void
   stroke (pointer, int) (display, drawable)
  offsets (float, float) (blx, bly);
Stroke the receiving path to the display.

protected int (action)
  action int i
pre
  0 <= i && i < actions_num;
Undocumented.

protected void
  add int action;
Undocumented.

protected void
  add (float, float) (x, y);
Undocumented.

protected (float, float) (x, y)
  coordinate int i
pre
  0 <= i && i < coords_num;
Undocumented.

void
  dealloc;
Undocumented.

void
  dispose;
Undocumented.

protected void
  flatten float flatness
       to (float, float, float, float, float, float) (x1, y1, x2, y2, x3, y3)
pre
  coords_num > 0;
Flatten a curve with the flatness to the indicated coordinates.

protected void
  flatten int k
       to (float, float, float, float, float, float) (x1, y1, x2, y2, x3, y3);
Flatten a curve to the receiver using 1 << k line segments, modulo weird circumstances.


Generated by tm 1.01.