nanDECK Version 1.27.1

Hello everybody, I’ve released a new version of nanDECK, with bugs fixed and new features:

New MANDALA directive

This directive draws a random image. Syntax:

MANDALA = "range", pos x, pos y, width, height, glyphs, angles, segments, min width, max width, min length, max length, html color, red, green, blue

– glyphs is the number of images created and superimposed
– angles is the max number of radial symmetries
– segments is the number of connected segments
– min width, max width is the width of segments
– min length, max length is the length of segments
– color is one or more color used in the process (random if not specified)
– red, green, blue are the variances of each component

Example:

mandala = 1, 0, 0, 100%, 100%

Result:

New TRANSFORM directive

This directive applies a projection to images loaded with IMAGE of in a layer structure. Syntax:

TRANSFORM = "range", x1, y1, x2, y2, x3, y3, x4, y4

The four couples of % are the coordinates of the projection quadrilateral (use only the range paramter to reset the projection). Example:

cardsize=18,10
oversample=2
imagefilter=spline
rectangle=1,0,0,100%,100%,#808080#FFFFFF#808080@90
transform=1,24,40,54,24,75,36,42,65
image=1,puerto rico.jpg,0,0,100%,100%,90
transform=1,24,40,42,65,43,94,26,62
image=1,puerto rico.jpg,0,0,100%,100%
transform=1,42,65,75,36,73,59,43,94
image=1,puerto rico.jpg,0,0,100%,100%,90

Result:

From gallery of n_and

New LINKCACHE directive

Syntax:

LINKCACHE = ON/OFF

With the ON parameter, a linked Google Sheet is saved locally to speed up subsequent executions.

New LINKADO directive

Syntax:

LINKADO=ON/OFF

With the ON parameter, instead of the internal library, the ADO libraries are used to load a spreadsheet.

New RANGEINS function

Syntax:

[range] = RANGEINS("range", position, "range", times)

This function takes a range (1st parameter) and add every Nth position (2nd parameter) another range (3rd parameter), optionally the 4th parameter specifies how many times.

Added X/Y flags it VISUAL to set global snap and size to grid

These flags set the snap and position flag on for all the objects in the visual editor (indipendently to the snap and position settings of individual objects).

Added parameters in HTMLIMAGE for margins

Now you can specify a border around an image in HTMLIMAGE, to be used in HTMLTEXT. Syntax:

HTMLIMAGE = "range", key, "image file", width, height, flags, angle, margin top, margin left, margin right, margin bottom

Added R flag in HTMLKEY to use regular expressions

Useful for replacing or adding a format to similar words, example:

htmlfont=default,arial,16,,#000000
htmlfont=underline,arial,16,U,#000000
htmlkey=1,"\w*summon\w*",*,underline,R,*
htmltext=1,"Summon, Summoner, Summoned, and Desummoned.",0,0,100%,100%,#FFFFFF,0,BE,100,default

Added Z flag in HTMLKEY to write all in a single line

Useful to be sure that multiple words (or images and words) stay on the same line in HTMLTEXT.

Added T flag in BRUSH to set a color as transparent in a custom brush

Useful when you want to fill a shape with a pattern with holes.

Added B flag in COLORCHANGE to blur images and a parameter to make changes only in certain areas

Syntax:

COLORCHANGE="range", pos x, pos y, width, height, html color, html color | html gradient, level, flag, "mask file", schema

The B flag blurs the image in the specified area (there is no need to specify color parameters); the level parameter specifies the number of blur passages (1 if not present), the 11th is used as a 5×5 matrix of blur weight for each pixel.

The 10th parameter can be used as a png mask to specify the area to blur or the area where to apply the color change; for this is used the transparency level of this png file.

Added N/S flags in LINKCOLOR to read font name and size

As with colors in a cell, you can use the flag N to create a sequence with the name of the fonts in a spreadsheet column; and the flag S to create a sequence with the font sizes.

Added a syntax in DISPLAY parameter to specify the number of rows

In the width parameter of the rectangle you can also specify a height with the syntax widthxheight, in this case multiple files can be created (replacing a ยง symbol with a counter).

Added multiple ranges in DUPLEX/FOLD directives

Example:

DUPLEX = 1-3|4-6, 7|8

This means that cards 1-3 are printed with 7th as back, and cards 4-6 with 8th as back.

Added NULL parameter to CHROMAKEY to disable transparency

The NULL value can be used in CHROMAKEY when you want that a layer can be applied whole, instead of treating one of its color as transparent.

Added parameter in FRAMEMAZE function for non-rectangular mazes

Syntax:

[label]=FRAMEMAZE(frames, width, height, start x, start y, flags SME, frames)

The 7th parameter can be used to specify the frames used to draw the maze in a non-rectangular shape.

Example:

cardsize=20,20
[all]=framebox(0,0,20,20,0.5,0.5,E)
[inner]=framedisk(allt20,allt3)
[out]=framesub(all*,inner)
[edge]=frameper(all*,0.1)
[maze]=framemaze(edge,40,40,0,0,,inner)
ellipse=1,<mazestart>,#FF0000
ellipse=1,<mazeend>,#00FF00
rectangle=1,<maze>,#0000FF
rectangle=1,<out>,#FFFFFF

Result:

Liked it? Take a second to support Nand on Patreon!
Become a patron at Patreon!

2 thoughts on “nanDECK Version 1.27.1”

  1. Thanks so much! Does the LINKCACHE just save the copy until that build is done (like, does it re-cache it the next time you build your deck)?

    1. It works this way, if there is a LINKCACHE=ON before the link:
      at the 1st validate the file is downloaded from Internet and saved on disk,
      at the 2nd and subsequent validates the file is loaded from disk (therefore faster),
      when you close and reopen the program, the file is downloaded anew.

Leave a Reply

Your email address will not be published. Required fields are marked *