nanDECK Version 1.26.3

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

New REPEAT function

This functions is used to build strings with repetitions of characters, the syntax is:

[label]=REPEAT("string", number)

Added parameters in LINE/LINERECT/BEZIER/BEZIERS for arrow angle

The standard arrow has the tip drawn with two lines at 45°, with these parameters you can change this angle:

LINE="range", pos x1, pos y1, pos x2, pos y2, html color | html gradient, thickness, pattern O/D/S, end arrow, start arrow, end angle, start angle

LINERECT="range", pos x, pos y, width, height, html color | html gradient, thickness, pattern O/D/S, end arrow, start arrow, flag TRBLDG, end angle, start angle

BEZIER="range", pos x1, pos y1, handle x1, handle y1, handle x2, handle y2, pos x2, pos y2, html color | html gradient, thickness, end arrow, start arrow, end angle, start angle

BEZIERS="range", pos x, pos y, handle x, handle y, html color | html gradient, thickness, end arrow, start arrow, end angle, start angle

And a negative angle draws the arrows with three lines.

Example:

line=1,1,1,5,1,#000000,0.1,,1
line=1,1,3,5,3,#000000,0.1,,1,,20
line=1,1,5,5,5,#000000,0.1,,1,,60
line=1,1,7,5,7,#000000,0.1,,1,,-20

Added parameter in HTMLBORDER for inner background transparency
Added parameters in HTMLBORDER for min/max height

These parameters let you draw the inner area of an HTMLTEXT using a HTMLBORDER line with a partial transparency and a min/max height. Syntax:

HTMLBORDER=htmlfont, type RECTANGLE / DOTTED / DASHED / DOUBLE / GROOVE / RIDGE / INSET / OUTSET / NONE, html color, thickness, gap top, gap left, gap right, gap bottom, corner rounding, html color, alpha, min. height, max. height

Added parameter in HTMLFONT for rotation of characters

Syntax:

HTMLFONT=tag, "font name", font size, style B/I/U/S/O/N/R/C/T/A/M/D/L/G/E/J/H/Y/Z/K/W/V/F, html color, alignment, shadow x, shadow y, shadow blur, shadow color, outline color, outline width, indent, highlight color, char. spacing, angle

Example:

htmlfont=default,arial,24,,#000000,center
htmlfont=rotated,arial,24,,#FF0000,,0,0,0,,,0,0,,0,-45
htmltext=1,"nanD<rotated>E</rotated>CK",0,0,100%,100%,#FFFFFF,0,BE,100,default

Added parameter in HTMLIMAGE for rotation of image

Syntax:

HTMLIMAGE="range", key, "image file", width, height, flag PTMBLREICDH, angle

Example:

htmlfont=default,arial,24,,#000000,center
htmlimage=1,(d),shieldcomb.png,0.8,0.8,PM,-90
htmltext=1,"nan(d)ECK",0,0,100%,100%,#FFFFFF,0,BE,100,default

Added parameter in HTMLTEXT for specifying a font used for paragraphs
Added U flag in HTMLTEXT for using font on multiple paragraphs

The 12th parameter specifies to use a font tag in each paragraph of the text. Note also that with the U flag a sequence in this parameter is applied sequentially in each paragraph.

Added parameter in EDGE for INSIDE borders
Added parameter in EDGE to change tips
Added parameter in EDGE to change corners

Syntax:

EDGE="range", type SOLID / INSIDE / DOT / DASH / DASHDOT / DASHDOTDOT / NULL / CUSTOM, pattern O/D/S, tip ROUND / SQUARE / FLAT, join ROUND / BEVEL / MITER

Some examples in this thread:

New parameters for EDGE

Added W/H flags in ICONS to distribute icons

Instead of grouping them, these flags distribute the icons horizontally (W) and/or vertically (H) in ICONS directive.

Added J flag in IMAGE for using alternate jpeg library
Added A flag in SAVE for using alternate jpeg library

I’ve added an alternative engine for jpeg images, that can be used in IMAGE (for showing a jpeg) and in SAVE (for saving a jpeg).

Added C flag in LAYER for using layers with the canvas

The C flag specifies that the LAYER is used with the canvas instead of in a card.

Added M/S flags in REPLACE for multiple/single replacements

The default behavior (now selected with the M flag) is to pair every from/to texts to every element of the 1st parameter, instead with the S flag the Nth pair of from/to texts are applied only to the Nth element of the 1st parameter.

Added F flag in COPYCARD for rotate cards upside down

The default with COPYCARD directive is to copy the card as-is. With the F flag the card is rotated upside-down.

Added W/H/D/U flags in INFO function

Results:

W - card width (in current units)
H - card height (in current units)
D - card dpi
U - name of the current units (cm/mm/inch)

nanDECK guild on BGG:

nanDeck Users

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

10 thoughts on “nanDECK Version 1.26.3”

  1. Any troubleshooting resources out there? Having a strange issue with an ICON directive displaying correctly in the visual editor but not in the preview or jpg exports.

  2. Any way to implement polish signs, like ę, ó, ą, ś, ł, ż, ź, ć, ń? NenDECK seems to do not work at all with those, regardless of the used font 🙁

    1. Write all the info about your cards in a spreadsheet, example:

      nanDECK example

      And you can use HTMLFONT+HTMLTEXT to read and show them:

      link=data.xlsx
      htmlfont=default,arial,16,,#000000
      htmltext=1-{(description)},[description],0,0,100%,100%,#FFFFFF,0,BE,100,default

      Result:

      nanDECK example

  3. The flag “E” in the “htmltext” field did the trick for me – it turned on the Explorer render and fixed the issue. Many thanks for Your help!

    1. Sorry, it seems that the last WordPress update messed up the download manager. I’ve changed the links, try now.

  4. Hello,
    I would like first to thank you for this excellent tool!

    Also, could I ask you for some help with the “LAYER” and “LAYERDRAW” commands?
    It looks to me that there is a typo in the manual for the second one (looks like «LAYER» was typed iso «LAYERDRAW») but mainly I am not able to make it work for me…

    Here is what I tried:


    LAYER=100,0,0,0,Mouvement,0,0,
    COLOR=,[COLOR_SUIT]
    IMAGE=,”../../Deck Components/RulesIcons/arrow-dunk.png”,3.4,0.3,0.5,0.5,0,NT,100,0,0,0,0
    COLOR=,[COLOR_SUIT]
    IMAGE=,[Suit_IconFile],3.4,1,0.5,0.5,0,NT,100,0,0,0,0
    ENDLAYER

    LAYERDRAW=,Mouvement,100,0,0,0
    LAYERDRAW=,Mouvement,,,,180

    The idea is to put in a layer 2 icons (in this example) and then to draw the layer twice: once in the top right corner, once in the lower-left corner with a rotation of 180°…
    It is well validated, but nothing is displaied…
    Strangely if I remove the 2 PAYERDRAW lines and the name in the LAYER line, then i works fine (for upper corner only, obviously).

    Could you please tell me more about this commands?

    Many thanks again and have a nice day

    1. Hello Ben, yes, there is a typo in the manual, I’ll correct it in the next version.

      About the 2nd LAYERDRAW, add all the parameters, example:

      layer=50,0,0,0,One
      font=arial,32,,#000000
      text=1,"A",0,0,20%,20%
      endlayer

      layerdraw=1,One
      layerdraw=1,One,100,0,0,180

Leave a Reply

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