nanDECK Version 1.26.1

Hello everybody, there is a new version of nanDECK, with bugs fixed and these new features:

New PAGESHAPE directive

This directive draws lines, rectangles and ellipses directly in a page (therefore there isn’t a range parameter, and a 100% here refers to the whole page, not to the card). The syntax is:

PAGESHAPE = x, y, width, height, flags, color

You can add several flags (each one is a format or a shape):

A) draw a rectangle
I) draw an ellipse

S) set solid background
M) set empty background

0) set solid edge
1) set dotted edge
2) set dashed edge
3) set dash+dot pattern for edge
4) set dash+dot+dot pattern for edge

T) draw a line in the top side of the rectangle
R) draw a line in the right side of the rectangle
B) draw a line in the bottom side of the rectangle
L) draw a line in the left side of the rectangle
H) draw an horizontal line in the middle of the rectangle
V) draw an vertical line in the middle of the rectangle
D) draw a diagonal line in the rectangle
G) draw a diagonal line (reversed) in the rectangle

E) do not draw the shape on even pages
O) do not draw the shape on odd pages

Example:

page=21,29.7,portrait,HV
font=arial,128,,#HHHHHH,#HHHHHH
text=1-9,{ยง},0,0,100%,100%
pageshape=1,1,19,27.7,MA,#0000FF
pageshape=0.25,0.25,0.5,0.5,SI,#FF0000
pageshape=20.25,0.25,0.5,0.5,SI,#FF0000
pageshape=0.25,28.95,0.5,0.5,SI,#FF0000
pageshape=20.25,28.95,0.5,0.5,SI,#FF0000

There is a rectangle at 1cm from the border, and four red circles. Note that MA means: set empty (M), then draw a rectangle (A), the reverse AM would have drawn a filled rectangle.

New DEPTH directive

With this directive you can specify a lower number of colors for the cards (to save RAM occupation), this is the syntax:

DEPTH = range, depth

Where depth can be:
24 = 16 millions colors (the default)
16 = 65,536 colors
8 = 256 colors
4 = 16 colors

New PDFMERGE function

This function is equivalent to the MERGEPDF directive, it was added for use in a loop. For example, this line splits a pdf in single pages:

[pdf]%,(a),1,PDFPAGES(nandeck-manual.pdf) = PDFMERGE(split(a).pdf,nandeck-manual.pdf,(a))

Added parameters in TEXT for stretching text

The 14th and 15th parameters in TEXT can be used for stretching texts horizontally and vertically. Example:

[text]="The brown fox jumps over the lazy dog."
font=arial,16,,#000000,#FFFF00
text=1,[text],0,0,100%,33%,center,wwcenter
text=1,[text],0,33%,100%,33%,center,wwcenter,0,100,,,,120,50
text=1,[text],0,66%,100%,33%,center,wwcenter,0,100,,,,50,120

Added X/Y flags in FONT directory for shrinking/stretching texts

These flags do an automatic shrinking/stretching of text. If you add an X flag to FONT, the text is shrinked if too large to fit the rectangle, and if you add an Y flag to FONT, the text is stretched if too small to fit the rectangle. Example:

font=arial,32,X,#000000,#FFFF00
text=1,"Test",10%,10%,80%,15%
text=1,"Test Test Test Test",10%,30%,80%,15%
font=arial,32,Y,#000000,#FFFF00
text=1,"Test",10%,50%,80%,15%

Added parameter in LOADPDF for angle

The 9th parameter of the LOADPDF directive can be used to specify the angle of the rotation of the page loaded from a PDF.

Added parameter in DICE directive for number of rerolls

The 8th parameter specifies how many times the dice are rerolled if is obtained a result marked with “**” (in the list of possible values).

Added T flag in FRAMEHEX function for removing last hexes

This flag removes the last hex from a shifted column (or row) of hexes. Example:

[one]=framehex(0,0,6,4,1,S)
polygon=1,<one>,6,30,#CFE2EE,#E7F1F7,0.1
[two]=framehex(0,5,6,4,1,ST)
polygon=1,<two>,6,30,#CFE2EE,#E7F1F7,0.1

Added “all” button in the interface

This button open all the scripts in a folder, in multiple tabs.

Added hint lines in the preview area

If you put the cursor in the preview area (right top) or the preview window, you see an hint with the line and directive of the element(s) under the cursor.

Added CTRL+click in the preview area

If CTRL+click on an element in the preview area or the preview window, the cursor in the text editor is moved to the correspondent line.