nanDECK Version 1.27

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

New RANGE directive

Syntax:

RANGE = offset

The parameter specifies a number of cards that is added to all subsequent ranges. This directive is useful to merge two scripts that draws cards in the same range, without having to rewrite all the ranges of the 2nd script.

New GRADIENTS directive

This directive can be used to specify additional parameters used in drawing gradients, or to add other gradients color; it works on every directive that uses gradients, and you can use more than one GRADIENTS directive.

Syntax:

GRADIENTS = "range", compression, rotation, flags, pos x, pos y, html color

Parameters:

“range”: a set of cards

compression: a factor used to draw gradient bands narrowly (greater than 1) or broadly (less than 1)

rotation: each axis is rotated of this angle (in degrees)

flags: you can use the following flags:

N – each pixel is drawn in the color of the closest axis between the two that define the sector in which it resides
F – each pixel is drawn in the color of the farthest axis between the two that define the sector in which it resides
M – each pixel is drawn in the average color of the two axis that defines the sector in which it resides
A – each pixel is drawn in the average color of all axis
P – each pixel is drawn in the average color of all axis, proportionally to the distance from the point specified with 5th and 6th parameters
D – delete all current gradients

pos x: horizontal position (in cm) of point used with P flag

pos y: vertical position (in cm) of point used with P flag

html color: in the same format used for HTML, you can also specify a gradient

Example:

CARDSIZE=5,5
GRADIENTS=1,1.33,0,A,0,0,#0000FF#FFFFFF#FF0000#FFFFFF#0000FF@0
GRADIENTS=1,1.33,90,A
RECTANGLE=1,0,0,100%,100%,#0000FF#FFFFFF#FF0000#FFFFFF#0000FF@0

Result:

From gallery of n_and

Added multiple angles for a gradient

You can specify more than one angle for a gradient. Example:

CARDSIZE=5,5
CIRCLE=1,0,0,100%,100%,#FF0000#FFFFFF#0000FF@0@90

Result:

From gallery of n_and

Added conic gradients

Using the 364 angle you can draw conic gradients. Example:

CARDSIZE=5,5
RECTANGLE=1,0,0,100%,100%,#FF0000#0000FF@364

Result:

From gallery of n_and

New LINKAUTO directive

Syntax:

LINKAUTO = ON/OFF

If you add a LINKAUTO = ON before a LINK directive, when you save the linked spreadsheet the deck is automatically validated and build.

New LINKTAB directive

In this version every tabulation present in a spreadsheet is removed. If you instead want that to be converted to something else, use a LINKTAB=string line.

New MEASURE function

This function measures the distance from a point until the color changes, in a specific direction, the syntax is:

MEASURE(x, y, direction)

The direction can be one between:

UP
DOWN
LEFT
RIGHT

Added parameter in HTMLMARGINS for font stretching

The 10th parameter can be used to change the horizontal size of the text, less than 100 shrinks the font, more than 100 stretches the font.

Added parameter in IMAGEFILTER for blending options

The 2nd parameter specifies a different algorithm used to draw all the images, can be chosen between these options (the standard is SOLID):

SOLID
ADD
SUB
MOD
DIV
DARKEN
LIGHTEN
SCREEN
DODGE
BURN
DIFFERENCE
EXCLUSION
AVERAGE
SCALE
BLENDADD
BLENDMOD

Added S flag in SAVE for shrinking the image

If you specify an S flag in the 13th parameter in SAVE directive, the images saved is reduced in the four edges until a different color is found (taking as reference color the one of the top-left pixel). In the 14th parameter you can specify a level of likeness for that color (zero is the same color).

Added I/E flags in LOADPDF for internal/external engine

If you specify an E flag in the 10th parameter in LOADPDF directive, instead of the internal engine you can use Ghostscript to transform a PDF into an image (the path to the Ghostscript executable must be set with the “Config” button).

Added C flag in SAVEPDF for convert PDF in CMYK using Ghostscript

If you add a C flag in SAVEPDF and you have set a path for Ghostscript executable in Setup, the resulting PDF is converted to CMYK color space, optionally using the ICC color profile specified as a file in the 3rd parameter

Added S/V flags in COLORCHANGE for variations in resulting color

With S (the default behavior) the replaced color is the one specified in the parameter, with V the replaced color changes depending from the original color.

Added parameter in RENDER for using a range of cards

The 4th parameter in RANGE directive can be used to create cards only within a range (with the usual range syntax), instead that only from a card (1st parameter) to another (2nd parameter).

Added parameter in POLYGON for zoom

The 13th parameter in the POLYGON directive sets the zoom for it (100 = standard size).

Added MULTI keyword in SEQUENCE..ENDSEQUENCE structure

If you add a MULTI=N line in a SEQUENCE..ENDSEQUENCE structure, subsequent lines are replicated N times, example:

SEQUENCE=
text|one
MULTI=2
text|two
MULTI=1
text|three
ENDSEQUENCE

The result is the sequence one|two|two|three.

Added parameter in LINKFILL for setting a number of columns

For correct LINKFILL operation, the number of starting columns can be indicated as the second parameter (in case of empty cells at the end of the row, the program is not able to understand exactly how many columns the row is made up of).

Added ranges of results in combinatoric engine

After the number of elements you can specify one or more filters, to keep only a subset of the results, with this syntax:

C[name]number;char1:min1-max1;char2:min2-max2... = ...

In the resulting sequence are added only the results that have char1 in a number of occurrences between min1 and max1, char 2 between min2 and max2, and so on.

Added Library button in the main window

This button shows a list of example scripts that can be selected and shown in the main edit window. The “Update” button can be used to download a new copy of these scripts (I want to add other script in the future).

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

10 thoughts on “nanDECK Version 1.27”

  1. There is a typo in the middle of page 25 of the nanDECK users guide.

    This excerpt includes the typo, or misstatement, in question:
    —— begin quoted text —–
    The label creation can be repeated in a for…next cycle, for example, if you want to define ten labels, with powers of two, you can write:
    [lab(count)]%,(count),1,9 = {(count)^2}
    Note that the condition parameter is empty (the comma after the % symbol), and that if the step parameter is omitted, its value is assumed equal to one. The variable (count) can be anything (the parentheses are not really needed). The result is equal to write this code:
    [lab1]=1
    [lab2]=4
    [lab3]=9
    [lab4]=16
    [lab5]=25
    [lab6]=36
    [lab7]=49
    [lab8]=64
    [lab9]=81
    —– end quoted text —-
    The above iterative label definition defines 9 labels with values that are perfect squares, not powers of 2. If you want powers of two, the expression is probably:

    [lab(count)]%,(count),1,9={2^(count)}

    Which would produce:

    [lab1]=2
    [lab2]=4
    [lab3]=8
    [lab4]=16
    [lab5]=32
    [lab6]=64
    [lab7]=128
    [lab8]=256
    [lab9]=512

      1. Thanks. It’s not a big thing, but it is the sort of thing I tend to notice.

        I really appreciate the tool; I sometimes have trouble understanding what all of the features are used for, but I appreciate them, and the hard work that goes into making everything work together. I’ve been a software engineer for over 40 years now, so I do know just how hard it is to keep everything working and still be adding features.

  2. Sorry, it seems that WordPress turned the entire thing, which was formatted, into a single paragraph.

    Maybe there is markup that I should have used, but I see nothing on the page to indicate it.

  3. Hello, thank you for your amazing tool.
    I think it could be useful to add a feature: a box to blur something behind it. It could be interesting for neat card design.
    Have a nice day.

        1. Do you mean a blur gradient? I’ve added an average from a 5×5 pixel matrix and it gives a decent blurry result to an image, but it’s not very scalable, it’s more an on/off feature.

  4. I’m struggling to find the actual download. I see the link on the side that says “Downloads” but I clink the link for the Nandeck and it just reloads this page.

Leave a Reply

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