pix 0.7: Reference Manual

::pixTop, Main, Index

Help procedures.

CommandsTop, Main, Index

colorHTMLtoRGBA [::pix]Top, Main, Index

Converts an HTML color into an RGBA value and returns it as a Tcl list.

colorHTMLtoRGBA HTMLcolor
Parameters
HTMLcolorstring
Return value

A Tcl list.

getKeys [::pix]Top, Main, Index

Get all objects from the context and the image.

getKeys
Return value

A Tcl dictionary with two keys: ctx a Tcl list of all ctx keys and img a Tcl list of all img keys.

mulMatrix [::pix]Top, Main, Index

Multiplies matrices.

mulMatrix ?args?
Parameters
argsmatrix (9 values)
Return value

The multiplied matrix as a list.

pathObjToString [::pix]Top, Main, Index

Parse path object.

pathObjToString path
Parameters
pathpath::new
Return value

The parsed path to SVG style path (string).

rotMatrix [::pix]Top, Main, Index

Create rotation matrix.

rotMatrix angle ?matrix?
Parameters
angledouble value (radian)
matrixlist (9 values) Optional, default "".
Return value

The matrix rotation as a list.

scaleMatrix [::pix]Top, Main, Index

Create scale matrix.

scaleMatrix scale ?matrix?
Parameters
scalelist x,y
matrixlist (9 values) Optional, default "".
Return value

The matrix scaled as a list.

svgStyleToPathObj [::pix]Top, Main, Index

Transforms a SVG style path (string) to a path::new object.

svgStyleToPathObj path
Parameters
patha string in SVG style.
Return value

A new path object.

toB64 [::pix]Top, Main, Index

Convert an img object to base 64.

toB64 object
Parameters
objectimg or ctx object.
Description

On the Nim side, base64 module is considered unstable, so use the toBinary command instead and then Tcl's binary encode base64 command.

Return value

Returns string.

toBinary [::pix]Top, Main, Index

Convert an img object to binary.

toBinary object ?format?
Parameters
objectimg or ctx object.
formatstring (png, qoi, bmp, ppm) . Optional, default png.
Return value

A string in binary format.

transMatrix [::pix]Top, Main, Index

Create translation matrix.

transMatrix trans ?matrix?
Parameters
translist x,y
matrixlist (9 values) Optional, default "".
Return value

The matrix translated as a list.