Common Lisp Package: VECTO

README:

FUNCTION

Public

CENTERED-CIRCLE-PATH (X Y RADIUS)

Add a circular subpath centered at X,Y with radius RADIUS.

CENTERED-ELLIPSE-PATH (X Y RX RY)

Add an elliptical subpath centered at X,Y with x radius RX and y radius RY.

Undocumented

ARC (CX CY R THETA1 THETA2)

ARCN (CX CY R THETA1 THETA2)

BILINEAR-DOMAIN (PARAM)

CENTERED-STRING-PATHS (X Y STRING)

CLEAR-CANVAS

CLIP-PATH

CLOSE-SUBPATH

CURVE-TO (CX1 CY1 CX2 CY2 X Y)

DRAW-CENTERED-STRING (X Y STRING)

DRAW-STRING (X Y STRING)

END-PATH-NO-OP

EVEN-ODD-CLIP-PATH

EVEN-ODD-FILL

EVEN-ODD-FILL-AND-STROKE

FILL-AND-STROKE

FILL-PATH

GET-FONT (FILE)

LINE-TO (X Y)

LINEAR-DOMAIN (PARAM)

MOVE-TO (X Y)

QUADRATIC-TO (CX CY X Y)

RECTANGLE (X Y WIDTH HEIGHT)

ROTATE (RADIANS)

ROTATE-DEGREES (DEGREES)

ROUNDED-RECTANGLE (X Y WIDTH HEIGHT RX RY)

SAVE-PNG (FILE)

SAVE-PNG-STREAM (STREAM)

SCALE (X Y)

SET-CHARACTER-SPACING (SPACING)

SET-DASH-PATTERN (VECTOR PHASE)

SET-FONT (FONT SIZE)

SET-GRADIENT-FILL (X0 Y0 R0 G0 B0 A0 X1 Y1 R1 G1 B1 A1 &KEY (EXTEND-START T) (EXTEND-END T) (DOMAIN-FUNCTION 'LINEAR-DOMAIN))

SET-LINE-CAP (STYLE)

SET-LINE-JOIN (STYLE)

SET-LINE-WIDTH (WIDTH)

SET-RGB-FILL (R G B)

SET-RGB-STROKE (R G B)

SET-RGBA-FILL (R G B A)

SET-RGBA-STROKE (R G B A)

SKEW (X Y)

STRING-BOUNDING-BOX (STRING SIZE LOADER &KEY (CHARACTER-SPACING 1.0d0))

STRING-PATHS (X Y STRING)

STROKE

STROKE-TO-PATHS

TRANSLATE (X Y)

Private

%CURVE-TO (STATE CX1 CY1 CX2 CY2 X Y)

Draw a cubic Bezier curve from the current point to (x,y) through two control points.

%QUADRATIC-TO (STATE CX CY X Y)

Draw a quadratic Bezier curve from the current point to (x,y) through one control point.

ADVANCE-BOUNDING-BOX (BBOX OFFSET)

Return a bounding box advanced OFFSET units horizontally.

APPLY-DASH-PHASE (DASH-VECTOR PHASE)

cl-vectors and PDF have different semantics for dashes. Given a PDF-style dash vector and phase value, return a cl-vectors-style dash vector and TOGGLE-P value.

APPROXIMATE-ELLIPTICAL-ARC (CX CY A B THETA ETA1 ETA2 &OPTIONAL (ERR 0.5))

Approximate an elliptical arc with a cubic bezier spline.

COPY-TRANSFORM-MATRIX (SEQUENCE)

Return a copy of SEQUENCE which is EQUAL to SEQUENCE but not EQ.

DRAW-EVEN-ODD-FILLED-PATHS (STATE)

Fill the paths of STATE into the image.

DRAW-FILLED-PATHS (STATE)

Fill the paths of STATE into the image.

DRAW-FUNCTION (DATA WIDTH HEIGHT FILL-SOURCE ALPHA-FUN)

From http://www.teamten.com/lawrence/graphics/premultiplication/

DRAW-FUNCTION/CLIPPED (DATA CLIP-DATA WIDTH HEIGHT FILL-SOURCE ALPHA-FUN)

Like DRAW-FUNCTION, but uses uses the clipping channel.

DRAW-PATHS (&KEY WIDTH HEIGHT PATHS TRANSFORM-FUNCTION DRAW-FUNCTION)

Use DRAW-FUNCTION as a callback for the cells sweep function for the set of paths PATHS.

DRAW-STROKED-PATHS (STATE)

Create a set of paths representing a stroking of the current paths of STATE, and draw them to the image.

FILL-IMAGE (IMAGE-DATA RED GREEN BLUE ALPHA)

Completely fill IMAGE with the given colors.

FLOAT-OCTET (FLOAT)

Convert a float in the range 0.0 - 1.0 to an octet.

LOADER-FONT-SCALE (SIZE LOADER)

Return the horizontal and vertical scaling needed to draw the glyphs of LOADER at SIZE units.

NMERGE-BOUNDING-BOXES (B1 B2)

Create a minimal bounding box that covers both B1 and B2 and destructively update B1 with its values. Returns the new box.

NMULT (M1 M2)

Destructive MULT; M2 is modified to hold the result of multiplication.

NTRANSFORM-BOUNDING-BOX (BBOX FUN)

Return BBOX transformed by FUN; destructively modifies BBOX with the new values.

OCTET-FLOAT (OCTET)

Convert an octet to a float.

STATE-DRAW-FUNCTION (STATE FILL-SOURCE FILL-STYLE)

Create a draw function for the graphics state STATE.

STATE-IMAGE (STATE WIDTH HEIGHT)

Set the backing image of the graphics state to an image of the specified dimensions.

STATE-STROKE-PATHS (STATE)

Compute the outline paths of the strokes for the current paths of STATE.

STRING-GLYPHS (STRING LOADER)

Return STRING converted to a list of ZPB-TTF glyph objects from FONT.

STRING-PRIMITIVE-PATHS (X Y STRING FONT &KEY (CHARACTER-SPACING 1.0d0))

Return the paths of STRING, transformed by the font scale of FONT.

Undocumented

%CLIP-PATH (STATE)

%CLOSE-SUBPATH (STATE)

%DRAW-CENTERED-STRING (STATE X Y STRING)

%DRAW-STRING (STATE X Y STRING)

%END-PATH-NO-OP (STATE)

%EVEN-ODD-CLIP-PATH (STATE)

%GET-FONT (STATE FILE)

%LINE-TO (STATE X Y)

%MOVE-TO (STATE X Y)

%ROTATE (STATE RADIANS)

%SCALE (STATE SX SY)

%SET-FONT (STATE LOADER SIZE)

%SKEW (STATE X Y)

%STRING-PATHS (STATE X Y STRING)

%TRANSLATE (STATE TX TY)

APPROXIMATE-ARC (CX CY A B THETA ETA1 ETA2 ERR)

APPROXIMATE-ARC-SINGLE (CX CY A B THETA ETA1 ETA2)

BEZIER-ERROR (A B ETA1 ETA2)

CALC-C-TERM (I B/A ETASUM ARR)

CLAMP-RANGE (LOW VALUE HIGH)

CLEAR-FILL-SOURCE (STATE)

CLOSE-PATHS (PATHS)

COLOR-SOURCE-FUNCTION (COLOR)

DASH-PATHS (PATHS DASH-VECTOR DASH-PHASE)

DRAW-ARC-CURVES (CURVES)

DRAW-CLIPPING-PATH (STATE ALPHA-FUN)

DRAW-CLIPPING-PATH-FUNCTION (DATA WIDTH HEIGHT ALPHA-FUN)

DRAW-PATHS/STATE (PATHS STATE)

ELLIPSE-DERIV-VAL (A B THETA ETA)

ELLIPSE-VAL (CX CY A B THETA ETA)

EMPTY-BOUNDING-BOX

EMPTY-PATH-P (PATH)

EVEN-ODD-ALPHA (ALPHA)

EVEN-ODD-FILL-DRAW-FUNCTION (STATE)

FILL-DRAW-FUNCTION (STATE)

FILL-SOURCE-FUNCTION (STATE)

FIND-FONT-LOADER (STATE FILE)

GLYPH-PATH-POINT (POINT)

GLYPH-PATHS (GLYPH)

GRADIENT-PARAMETER-FUN (X0 Y0 X1 Y1)

HYPERDOC-LOOKUP (SYMBOL TYPE)

IDENTITY-MATRIX

IMULT (A B)

INTERSECT-CLIPPING-PATHS (DATA TEMP)

INVERT-MATRIX (MATRIX)

LERP (P Q A)

MAKE-CLIPPING-CHANNEL (WIDTH HEIGHT INITIAL-ELEMENT)

MAKE-CLIPPING-PATH (WIDTH HEIGHT)

MAKE-CLIPPING-PATH-FUNCTION (STATE TYPE)

MAKE-DRAW-FUNCTION (DATA CLIPPING-PATH WIDTH HEIGHT FILL-SOURCE ALPHA-FUN)

MAKE-TRANSFORM-FUNCTION (TRANSFORM-MATRIX)

MAKE-TRANSFORM-MATRIX (&KEY ((X-SCALE DUM1) 1.0) ((Y-SKEW DUM2) 0.0) ((X-SKEW DUM3) 0.0) ((Y-SCALE DUM4) 1.0) ((X-OFFSET DUM5) 0.0) ((Y-OFFSET DUM6) 0.0))

MATRIX (A B C D E F)

MULT (M1 M2)

NONZERO-WINDING-ALPHA (ALPHA)

OPEN-FONT-LOADER (THING)

PRELERP (P Q A)

ROTATION-MATRIX (THETA)

SCALING-MATRIX (SX SY)

SET-RGB-COLOR (COLOR R G B)

SET-RGBA-COLOR (COLOR R G B A)

SKEWING-MATRIX (ALPHA BETA)

STROKE-DRAW-FUNCTION (STATE)

STROKE-PATHS (PATHS &KEY LINE-WIDTH JOIN-STYLE CAP-STYLE)

STROKE-SOURCE-FUNCTION (STATE)

TOLERANCE-SCALE (STATE)

TRANSFORM-COORDINATES (X Y TRANSFORM-MATRIX)

TRANSFORM-MATRIX-X-OFFSET (STRUCTURE)

SETFTRANSFORM-MATRIX-X-OFFSET (NEW-VALUE STRUCTURE)

TRANSFORM-MATRIX-X-SCALE (STRUCTURE)

SETFTRANSFORM-MATRIX-X-SCALE (NEW-VALUE STRUCTURE)

TRANSFORM-MATRIX-X-SKEW (STRUCTURE)

SETFTRANSFORM-MATRIX-X-SKEW (NEW-VALUE STRUCTURE)

TRANSFORM-MATRIX-Y-OFFSET (STRUCTURE)

SETFTRANSFORM-MATRIX-Y-OFFSET (NEW-VALUE STRUCTURE)

TRANSFORM-MATRIX-Y-SCALE (STRUCTURE)

SETFTRANSFORM-MATRIX-Y-SCALE (NEW-VALUE STRUCTURE)

TRANSFORM-MATRIX-Y-SKEW (STRUCTURE)

SETFTRANSFORM-MATRIX-Y-SKEW (NEW-VALUE STRUCTURE)

TRANSFORM-PATH (PATH FUN)

TRANSFORM-PATHS (PATHS FUN)

TRANSFORM-POINT (POINT FUN)

TRANSLATION-MATRIX (TX TY)

MACRO

Public

Undocumented

WITH-CANVAS ((&KEY WIDTH HEIGHT) &BODY BODY)

WITH-GRAPHICS-STATE (&BODY BODY)

Private

Undocumented

MATRIX-BIND (LAMBDA-LIST VECTOR &BODY BODY)

GENERIC-FUNCTION

Private

AFTER-PAINTING (STATE)

Invoke the post-painting function.

APPLY-MATRIX (STATE MATRIX)

Replace the current transform matrix of STATE with the result of premultiplying it with MATRIX.

CALL-AFTER-PAINTING (STATE FUN)

Call FUN after painting, and reset the post-painting fun to a no-op.

CLEAR-PATHS (STATE)

Clear out any paths in STATE.

CLEAR-STATE (STATE)

Clean up any state in STATE.

CLOSE-FONT-LOADERS (STATE)

Close any font loaders that were obtained with GET-FONT.

COPY (OBJECT)

Copy an object in a way suitable for pushing to the graphics state stack. That is, if it's an immutable object, simply return the object; otherwise, create a new object with the immutable state copied.

TRANSFORM-FUNCTION (STATE)

Return a function that takes x, y coordinates and returns them transformed by STATE's current transformation matrix as multiple values.

Undocumented

CLIPPING-DATA (OBJECT)

EMPTYP (OBJECT)

IMAGE-DATA (STATE)

TRANSFORM-INTERPOLATION (INTERPOLATION FUN)

TRANSFORMABLEP (INTERPOLATION)

WRITABLE-CLIPPING-DATA (OBJECT)

XMAX (OBJECT)

SETFXMAX (NEW-VALUE OBJECT)

XMIN (OBJECT)

SETFXMIN (NEW-VALUE OBJECT)

YMAX (OBJECT)

SETFYMAX (NEW-VALUE OBJECT)

YMIN (OBJECT)

SETFYMIN (NEW-VALUE OBJECT)

SLOT-ACCESSOR

Private

SCRATCH (OBJECT)

A temporary channel used to store the new clipping path to intersect with the old one.

SETFSCRATCH (NEW-VALUE OBJECT)

A temporary channel used to store the new clipping path to intersect with the old one.

Undocumented

AFTER-PAINT-FUN (OBJECT)

SETFAFTER-PAINT-FUN (NEW-VALUE OBJECT)

ALPHA (OBJECT)

SETFALPHA (NEW-VALUE OBJECT)

BLUE (OBJECT)

SETFBLUE (NEW-VALUE OBJECT)

BOUNDING-BOX (OBJECT)

SETFBOUNDING-BOX (NEW-VALUE OBJECT)

CAP-STYLE (OBJECT)

SETFCAP-STYLE (NEW-VALUE OBJECT)

CHARACTER-SPACING (OBJECT)

SETFCHARACTER-SPACING (NEW-VALUE OBJECT)

CLIPPING-PATH (OBJECT)

SETFCLIPPING-PATH (NEW-VALUE OBJECT)

DASH-PHASE (OBJECT)

SETFDASH-PHASE (NEW-VALUE OBJECT)

DASH-VECTOR (OBJECT)

SETFDASH-VECTOR (NEW-VALUE OBJECT)

DATA (OBJECT)

SETFDATA (NEW-VALUE OBJECT)

FILL-COLOR (OBJECT)

SETFFILL-COLOR (NEW-VALUE OBJECT)

FILL-SOURCE (OBJECT)

SETFFILL-SOURCE (NEW-VALUE OBJECT)

FONT (OBJECT)

SETFFONT (NEW-VALUE OBJECT)

FONT-LOADERS (OBJECT)

SETFFONT-LOADERS (NEW-VALUE OBJECT)

GREEN (OBJECT)

SETFGREEN (NEW-VALUE OBJECT)

HEIGHT (OBJECT)

SETFHEIGHT (NEW-VALUE OBJECT)

IMAGE (OBJECT)

SETFIMAGE (NEW-VALUE OBJECT)

JOIN-STYLE (OBJECT)

SETFJOIN-STYLE (NEW-VALUE OBJECT)

LINE-WIDTH (OBJECT)

SETFLINE-WIDTH (NEW-VALUE OBJECT)

LOADER (OBJECT)

SETFLOADER (NEW-VALUE OBJECT)

PATH (OBJECT)

SETFPATH (NEW-VALUE OBJECT)

PATHS (OBJECT)

SETFPATHS (NEW-VALUE OBJECT)

RED (OBJECT)

SETFRED (NEW-VALUE OBJECT)

SIZE (OBJECT)

SETFSIZE (NEW-VALUE OBJECT)

STROKE-COLOR (OBJECT)

SETFSTROKE-COLOR (NEW-VALUE OBJECT)

TRANSFORM-MATRIX (OBJECT)

SETFTRANSFORM-MATRIX (NEW-VALUE OBJECT)

WIDTH (OBJECT)

SETFWIDTH (NEW-VALUE OBJECT)

VARIABLE

Public

Undocumented

*DEFAULT-CHARACTER-SPACING*

Private

Undocumented

*HYPERDOC-BASE-URI*

+CUBIC-ERROR-COEFFS-0+

+CUBIC-ERROR-COEFFS-1+

CLASS

Private

Undocumented

CLIPPING-PATH (OBJECT)

COLOR

EMPTY-CLIPPING-PATH

FONT (OBJECT)

GRAPHICS-STATE

PROXY-CLIPPING-PATH

RGBA-COLOR

CONSTANT

Public

+KAPPA+

From http://www.whizkidtech.redprince.net/bezier/circle/, the top Google hit for my vague recollection of this constant.

Private

Undocumented

+PNG-CHANNELS+

+PNG-COLOR-TYPE+