Common Lisp Package: NET.HEXAPODIA.IMAGE

README:

FUNCTION

Public

CIRCLE (IMAGE X-CENTRE Y-CENTRE RADIUS R G B &OPTIONAL (ALPHA 1.0))

Draw a circle in IMAGE, centred on <X-CENTER Y-CENTRE>, with the specified RADIUS. Use the R, G and B values provided and use ALPHA as the alpha-blend parameter (defaults to 1.0). Does not have a useful return value.

CIRCLE-FILL (IMAGE X-CENTRE Y-CENTRE RADIUS R G B &OPTIONAL (ALPHA 1.0))

Draw a filled circle in IMAGE centred on <X-CENTER Y-CENTRE>, with the specified DIAMETER. Use the R, G and B values provided and use ALPHA as the alpha-blend parameter (defaults to 1.0). Fill the circle.

CUT-IMAGE (IMAGE X0 Y0 X1 Y1 &OPTIONAL (ALPHA 1.0))

Create a copy of the area of IMAGE that extends from <X0,Y0> to <X1,Y1>, also create an alpha map that is initialised to the value given to ALPHA (default is 1.0). Note that this alpha-map is *not* automatically referenced!

ELLIPSIS (IMAGE X0 Y0 X1 Y1 LONG-AXIS R G B &OPTIONAL (ALPHA 1.0))

Draw an ellipsis in IMAGE. The two foci are <X0 Y0> and <X1 Y1>. The long axis is LONG-AXIS long and the colour of the ellipsis is the specified R, G and B values. Use ALPHA as the alpha-blend value (defaults to 1.0).

GET-PIXEL (IMAGE X Y &OPTIONAL (TYPE 'LIST))

Retrieve the R G B values of the <X,Y> pixel in IMAGE. Return the triplet as TYPE (defaults to list).

LINE (IMAGE X0 Y0 X1 Y1 R G B &OPTIONAL (ALPHA 1.0))

Draw a line in IMAGE from <X0 Y0> to <X1 Y1>, using R, G and B as colour. Use ALPHA as alpha-blend value (defaults to 1.0).

MAKE-IMAGE (WIDTH HEIGHT)

Create an IMAGE object, with specified width and height

PLOT (IMAGE X Y R G B &OPTIONAL (ALPHA 1.0))

Draw a pixel in IMAGE, ar position <X Y>, with the specified R, G and B values. Use ALPHA as alpha-blend value (defaults to 1.0).

POLY-LINE (IMAGE XY-PAIRS R G B &OPTIONAL (ALPHA 1.0))

Draw a poly-line in IMAGE (all corners are specified in XY-PAIRS as elements in a flat list, as (X0 Y0 X1 Y1 X2 Y2 ...). Use R, G and B as colour and ALPHA as alpha-blend (defaults to 1.0).

PUT-IMAGE (SOURCE TARGET X-OFFSET Y-OFFSET &KEY (ALPHA 1.0) ALPHA-MAP (SOURCE-X 0) (SOURCE-Y 0) (SOURCE-WIDTH (WIDTH SOURCE)) (SOURCE-HEIGHT (HEIGHT SOURCE)))

Copy a rectangle from SOURCE to TARGET, placing the result wit the upper left corner at <X-OFFSET, Y-OFFSET> in the target. Optionally, specily the ALPHA blend parameter to use (defaults to 1.0), an ALPHA-MAP, an array of wXh for the source image, having one alpha-blend per pixel stored in it. It's also possible to specify a sub-rectangle within the source image, with the upper left corner at <SOURCE-X, SOURCE-Y>, having SOURCE-WIDth and SOURCE-HEIGHT.

RECT (IMAGE X0 Y0 X1 Y1 FILL R G B &OPTIONAL (ALPHA 1.0))

Draw a rectangle in IMAGE, with one corner at <X0 Y0> and the diagonally opposite at <X1 Y1>. Use R, G and B for colour and use ALPHA as alpha-blend (defaults to 1.0).

TEXT (IMAGE TEXT X Y R G B &OPTIONAL (ALPHA 1.0))

Draw the string TEXT in IMAGE, with upper left corner at <X Y>, using the specified R, G and B values. Use ALPHA as alpha-blend value. Returns (VALUE <max-x> <max-y>), to get exact bounding rectangle, plot at <0 0>, with an ALPHA of 0.0 and you will have (VALUES <width> <height>) as return value.

Undocumented

EXPORT-TO-GIF (IMAGE FILE-NAME &OPTIONAL (COMMENT a))

Private

Undocumented

ALPHA-BLEND (BACK FORE ALPHA)

BRESENCIRCLE (IMAGE X Y DIAM R G B ALPHA)

CALL-WITH-CLIP-REGION (REGION BODY)

CIRCLE-POINTS (X Y R)

DEFINE-CHAR (CHARACTER &REST DATA)

DISTANCE (X0 Y0 X1 Y1)

ELLIPSIS-FILL (IMAGE X0 Y0 X1 Y1 LONG-AXIS R G B &OPTIONAL (ALPHA 1.0))

ELLIPSIS-POINTS (X0 Y0 X1 Y1 LONG-AXIS)

EXPORT-TO-FILE (IMAGE NAME &KEY (FORMAT GIF) COMMENT)

EXPORT-TO-PNG (IMAGE FILE-NAME)

EXPORT-TO-STREAM (IMAGE STREAM &KEY FORMAT COMMENT)

FIND-DIR (X0 Y0 X1 Y1)

FORMAT-FROM-NAME (FILE-NAME)

IMAGE->PNG (IMAGE)

IMPORT-FROM-FILE (SOURCE &KEY (FORMAT GIF) &ALLOW-OTHER-KEYS)

IMPORT-FROM-FILENAME (SOURCE &KEY (FORMAT GIF) &ALLOW-OTHER-KEYS)

MAKE-COLOR-TABLE (IMAGE)

NEXTS (X Y DIR)

PICK (A IX OP)

PUT-IMAGE-FAST (SOURCE TARGET SX SY SW SH TX TY)

PUT-IMAGE-MAP (SOURCE ALPHA-MAP TARGET SX SY SW SH TX TY)

PUT-IMAGE-SLOW (SOURCE ALPHA TARGET SX SY SW SH TX TY)

READ-FONT (FILESPEC)

SKIPPIFY-COLOR-TABLE (COLORTAB)

TABLE-TOO-BIG-P (CTAB)

USE-FONT (NAME)

WRITE-GIF-TO-STREAM (IMAGE STREAM &OPTIONAL (COMMENT a))

WRITE-PNG-TO-STREAM (IMAGE STREAM)

MACRO

Private

Undocumented

WITH-CLIP-REGION ((X0 Y0 X1 Y1) &BODY BODY)

GENERIC-FUNCTION

Public

Undocumented

EXPORT-IMAGE (IMAGE SINK &KEY (COMMENT a) FORMAT &ALLOW-OTHER-KEYS)

IMPORT-IMAGE (SOURCE &KEY (FORMAT GIF) &ALLOW-OTHER-KEYS)

SLOT-ACCESSOR

Public

Undocumented

HEIGHT (OBJECT)

WIDTH (OBJECT)

Private

Undocumented

ALPHA-DATA (OBJECT)

IMAGE-DATA (OBJECT)

VARIABLE

Private

*FILE-FORMATS*

Association list, mapping file types to image formats

Undocumented

*CLIP-REGION*

*FONT-MAP*

*TEXT-MAP*

CLASS

Private

Undocumented

IMAGE

SUB-IMAGE