I added a version of the program with an installer to the downloads. The program is the same (version 1.28.3), but the installer follows the Windows standards, namely:
installs the executable in the program files folder,
creates a menu item,
creates an uninstall item,
all accessory files (e.g., nanDECK.ini and the reference) are downloaded to a folder in AppData (instead of in the program folder).
Hi everyone, a new version of nanDECK has been released, featuring bug fixes and the following new additions:
New CONTOUR directive
This directive adds a border to all graphic elements drawn so far, the syntax is:
CONTOUR="range", pos x, pos y, width, height, html color, thickness, pattern O/D/S, distance, random
Example:
font=arial,16,,#000000 text=1,"Lorem Ipsum",10%,10%,80%,20%,center,wwcenter htmlfont=default,arial,12,,#000000,justify htmlmargins=default,6%,6%,6%,6% htmltext=1,"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",10%,30%,80%,60%,#FFFFFF,0,BE,100,default font=arial,16,,#FF0000 text=1,"10",0%,80%,20%,20%,center,wwcenter text=1,"20",80%,80%,20%,20%,center,wwcenter contour=1,0,0,100%,100%,#FFFFFF#FF0000#000000,3%
These directives save or load the current deck to a file (the file name must be given as a parameter). They are also present in the interface in two buttons (“Save store as…” and “Load”), at the bottom right of the main window.
New LINKBOOL directive
This directive allows you to indicate how the Boolean values in the spreadsheet should be read (the default is True/False). The syntax is:
LINKBOOL=true, false
New INFOFIELDS function
This function returns a sequence of column names read from a spreadsheet (you can specify more than one filename, either separated by commas or using a sequence of filenames).
Added parameter to TRACK/TRACKRECT to indicate the number of boxes in links
Now you can indicate in TRACK/TRACKRECT how many spaces to draw in the section connecting one track to the previous one (the values in each lane must be separated by a minus sign). Example:
Added parameter in POLYGON and STAR to indicate a pattern for the sides
In the eighteenth parameter of POLYGON and in the thirteenth parameter of STAR you can indicate a sequence of 0 and 1 to partially trace a side (you can indicate multiple sequences by separating them with the minus symbol to differentiate the sides). Example:
Option to specify sequences of zoom values in creating frames
In all functions that create frames (FRAMEBOX, FRAMEHEX, FRAMEBAR, FRAMECLOCK, and FRAMEBEZIER) you can specify a sequence for the zoom parameter, and a value is applied for each frame created. Example:
Added S, P flags to FRAMECLOCK to create spirographic pattern frames
The S flag in FRAMECLOCK creates a spirographic pattern with a wheel rotating along the outer circumference of another wheel, while with the P flag the wheel rotates along the inner circumference. With these flags the tenth parameter is the diameter of the first wheel, the eleventh is the diameter of the second one, and the twelfth is the distance between the center of the second wheel and the center of the frames that are created. Example:
You can now specify the rotation angle of a specific icon in the ninth parameter of the ICON directive.
Added parameter in LIMIT to define global behaviour
If you specify ON as the second parameter of the LIMIT directive, from that line onwards all graphic objects are considered to be followed by a LIMIT directive.
Added parameter in FRAMETRANS to keep the original numbering of frames
Normally the FRAMETRANS function creates frames with the same name, now you can specify a prefix as the eighth parameter, for example, if the original name for a frame is , the specified prefix is ”frame”, the new name is “modified”, then the new full name for that frame will be <modified100>.
Added + flag to FRAMELIST function to append a number to frames names
Normally the FRAMELIST function creates frames with the same name, now you can add the prefix + to one or more of its parameters to add a progressive number to the result.
Added F flag to FRAMEHEX function to specify number of hexagons
Normally the fifth parameter of the FRAMEHEX function indicates the size of the hexagon that is created, now you can indicate the number of hexagons that must occupy the space of the FRAMEHEX by indicating the F flag (normally vertically, horizontally if the A flag is present).
Added L flag to CALC to evaluate conditional expressions
This flag evaluates a string or sequence of logical expressions and replaces them with the values _TRUE_ or _FALSE_.
Added U flag to CALCULATE to calculate string occurrences
This flag calculates how many times a substring occurs in a string (or sequence).
This function returns a sequence with all the names of the sheets read from a spreadsheet (in the form filename!sheetname), the syntax is:
[name] = INFOSHEETS(filename)
New HTMLTOANSI function
This function converts HTML Unicode character codes (when read from a spreadsheet) to ANSI codes, useful when a special code must be used both in HTMLTEXT (then use the label directly) and in IMAGE or SAVE (then use this function to convert it). The syntax is:
[label] = HTMLTOANSI([label])
New FRAMEREC directive
Normally frames and subframes (frames within frames) are interpreted, i.e. two levels of frames. If a higher level of nesting is needed, three, four or more can be specified with this command. The syntax is:
FRAMEREC = number
New LINKSORT directive
With this line before the LINK you can change the reading order of a linked file, indicating the field by which it should be sorted (the D flag is used to indicate that the sorting is in descending order, while N indicates that the field is numeric). The syntax is:
LINKSORT = "field", flag DN
Added N flag in COLORCHANGE for a noise effect
Example (the level parameter indicates the intensity of the effect):
Added Q flag to COLORCHANGE for a descending pixel sorting effect
Added gradient type parameter in GRADIENTS directive
In the 11th parameter you can indicate a series of characters to say that the transition must be blended (Z), sharp (0), or random (with various levels of intensity (1..9,A..K). Example:
Added jpeg compression parameter to CMYK directive
In the fifth parameter of the CMYK directive you can indicate the level of compression used for jpeg images (when saved with the SAVE directive). The parameter is a number from 0 (maximum compression and minimum quality) to 100 (maximum quality and minimum compression).
Added position and transparency parameters to ICON directive
Now in the ICON directive you can specify an offset and an individual transparency level icon by icon. The syntax is:
In the seventh parameter of the SAVE command you can indicate (in the format #XX) a global transparency level for the entire image (from 00 = completely transparent to FF = completely solid).
Added I and H flags in CALC function to get ascii codes/characters
In CALC function, with the I flag you get the ASCII code of the character indicated as a parameter, with the H flag you get the character corresponding to the numeric code indicated as a parameter.
Added I and R flags in FRAMECLOCK to change the frame distance
Normally a spiral in FRAMECLOCK places elements at an increasing logarithmic distance, with the R flag an inverse logarithmic distance is used, while with the I flag the distance is linear. Example:
Added creation of a sequence of angles in FRAMECLOCK function
When the FRAMECLOCK function is used, a sequence with the suffix _ang, containing the rotation angles of the frames, is created in addition to the frame sequence. Example:
Added creation in FRAMEMELD of a frame using center points
Normally, to calculate the resulting frame, you look at the top, left, right, and bottom edges of all the frames specified in the parameters. Now, in addition to this mode, a second resulting frame is created (with the suffix _avg) that instead considers the midpoints of each frame, calculates its overall midpoint, and adds double the average distance to indicate the size). This is useful for frames in a hexagonal grid.
Added O flag in SAVEPDF to open the PDF when it is created
With the O flag, once a PDF has been created with the SAVEPDF directive, it is also opened with the default reader.
Added N flag in JOINIF to not add elements when test is false
In JOINIF, one element is normally added for a positive condition, and another (or an empty element) for a negative condition. Using the N flag, no element is added for a negative condition.
Added option in TOKENIZE to create a sequence with all elements
In TOKENIZE the second parameter indicates which element to extract from the sequence, if you leave it empty then a sequence with all the elements will be created as a result.
Added token and rotation maps parameters to TOKEN directive
The positions and rotations of tokens in the virtual table can now be stored (in two files respectively) using one button and reloaded by indicating the files in the fifteenth and sixteenth parameters of the TOKEN directive. There are two examples in this thread:
If a token is defined with a sequence of images, the mouse wheel is normally used to select one. The L flag disables this functionality.
Added S flag in TOKEN to rotate them 60°
Normally a token is rotated 90° with the right mouse button. With the S flag it is rotated 60° instead.
Added type parameter to MODULEPDF directive Added type parameter to PDFMODULE function
By default a textbox is added in a MODULEPDF/PDFMODULE line, now with CHECKBOX in the 12th parameter you can add a checkbox in the PDF module.
Added SEPARATOR and TRIMVALUE options in SEQUENCE..ENDSEQUENCE
Within a SEQUENCE..ENDSEQUENCE structure, you can use a TRIMVALUE=ON/OFF line to trim spaces before and after the value, and a SEPARATOR=<character> line to specify a character other than the standard | character between the field name and the value.
Hi all, version 1.28 has a bug that makes HTMLTEXT unusable when OVERSAMPLE is present, so I quickly released this update. Also, there are these additions:
New SETF directive
This directive creates a filter that is applied in the Simulator: when a card is drawn in a hand, it is kept only if the tag indicated in the first parameter is equal to the number indicated in the second, otherwise it is returned to the deck and another is drawn; this filter is applied to the card indicated in the third parameter. The syntax is:
TAGF = tag, number, card
Added the ability to use a sequence of filenames in the first parameter to the LINK directive
This can be useful when you want to link an undefined list of files, obtained for example from a DIRFILES function. Example:
[a]=dirfiles("data*.xlsx") link=[a]
Added E flag in DECK to delete an empty deck
In the virtual table, with this flag when the deck is empty it is eliminated.
The font parameters (name, size and colors) are read by the last FONT line. Example:
font=arial,12,,#FF0000,#00FF00 modulepdf="result.pdf","source.pdf",1,1,1,10,2 font=times new roman,20,,#00FF00,#FF0000 modulepdf="result.pdf","source.pdf",1,1,5,10,4,"Two",CENTER,ON font=arial,12,,#FF0000,#00FF00 modulepdf="result.pdf","source.pdf",2,1,10,10,2,"Three",RIGHT,OFF,ON
New PAGETEXT directive
This directive writes a text directly in a page (therefore there is not a range parameter, and a 100% here refers to the whole page, not to the card). The font can be specified with a PAGEFONT directive. The syntax is:
This directive indicates a sequence whose values are associated with the cards. Every time the corresponding value changes between one card and another, a page break is added to the printout. The syntax is:
PAGEBREAK = "values"
New SEED directive
By default, random numbers are generated randomly, but using this directive the sequence of random numbers will be fixed, different depending on the number used as a parameter. This seed number can be set with this directive, or from Config -> Main. The syntax is:
SEED = seed number
New SEEDRANGE directive
It works the same way as SEED, but has a parameter for the application range. The syntax is:
SEEDRANGE = "range", seed number
New LINKREP directive
This directive is used to replace a string with another when reading data from a LINKed file (you can use muliple LINKSEPs before the LINK line). The syntax is:
LINKREP = "from", "to"
New LINKCSV directive
This directive modifies the encoding of csv files read with a LINK directive. If not used, the default is ANSI encoding. The syntax is:
LINKCSV = encoding
The encoding parameter can be ANSI, UTF7, UTF8, UTF16, or UTF16BE.
New PDFMODULE function
This function works the same way as the MODULEPDF directive.
New FILEREAD function
This function creates a label by reading the content from a text file on disk, this is the syntax:
[name] = FILEREAD(filename)
New INFOFILE function
This function returns information read from the file indicated among the parameters, the syntax is:
[name] = INFOFILE(flag, filename)
The flag can be one of this:
E the function returns 1 for file present, 0 for file not present W return the width of the image file H return the height of the image file
New RANGETRANS function
This function shifts the values contained in a range by a certain offset (positive or negative), this is the syntax:
[range] = RANGETRANS("range", offset)
New RANGEREP function
This function replaces empty values (-1) from range1 with other values from range2, … rangeN, this is the syntax:
Added different types, colors, thicknesses, and corners for HTMLBORDER
For type, html color, thickness, and corner rounding parameters in HTMLBORDER you can now specify a sequence of two, three, or four values, that are used for drawing different edges (type, html color, and thickness) or corners (corner rounding). Example:
[text]="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." htmlfont=font_t,arial,8,,#000000,justify,0,0,0,,,0,5% htmlmargins=font_t,5%,5%,5%,5%,top htmlborder=font_t,rectangle|dotted,#0000FF|#FF0000,2%|1%,5%,5%,5%,5% htmlfont=font_c,arial,8,,#000000,justify,0,0,0,,,0,5% htmlmargins=font_c,5%,5%,5%,5%,center htmlborder=font_c,rectangle|dashed,#0000FF|#FF0000,2%|1%,5%,5%,5%,5% htmlfont=font_b,arial,8,,#000000,justify,0,0,0,,,0,5% htmlmargins=font_b,5%,5%,5%,5%,bottom htmlborder=font_b,rectangle|double,#0000FF|#FF0000,2%|1%,5%,5%,5%,5% htmltext=1-{(text)},[text],0,0,100%,100%,#FFFFFF,0,BE,100,font_t htmltext=1-{(text)},[text],0,0,100%,100%,#FFFFFF,0,BE,100,font_c htmltext=1-{(text)},[text],0,0,100%,100%,#FFFFFF,0,BE,100,font_b
Added parameters in HTMLFONT/HTMLIMAGE to add CSS styles
Now you can directly insert CSS elements into the HTMLFONT (17th parameter) and HTMLIMAGE (16th parameter) directives.
Added parameter in LINE/LINERECT to set distance for elements
For LINE/LINERECT patterns it is possible to specify the distance between the elements. Example:
Added F flag to HTMLKEY to apply font only to replaced text Added parameters in HTMLKEY to replace strings
The syntax of HTMLKEY now is:
HTMLKEY="range", key, "text", htmlfont, flag CRFZD, "replace", "from", "to"
If the F flag is present in addition to the R flag, the font specified in the fourth parameter is applied only to the replaced text.
In the result found with the R flag, the text specified in the “from” parameter is replaced with the text in the “to” parameter; both can also be a sequence of texts.
Added L flag to ICONS to keep icons in a single line
In ICONS, with the W and H parameters the icons are arranged so as to occupy the entire space, normally on multiple lines (e.g. four icons are arranged in a two by two square); with the L flag this arrangement is forced onto one line.
Added X flag to ICONS to use keys with variable length
In ICONS the X flag must be used when the keys defined with the ICON command do not always have the same length (the 14 parameter is not used). Note that in this case there cannot be keys of different lengths that start with the same letter, e.g. A and AB.
Added U flag in PAGE directive to draw edges over guidelines
Normally, the sections of the page indicated by the edge parameters of the PAGE directive are drawn below the guidelines; adding the U flag causes them to be drawn above.
Added LINE, LINEDOT, LINEDASH types of guidelines in BORDER Added parameter in BORDER for the thickness of guidelines
Three new styles can be used for the guidelines (LINE, LINEDOT, LINEDASH), also for all the guidelines the thickness can be indicated, and for each guideline a different color can be used (when the ninth parameter has a value greater than 0). Example:
Added parameter in IMAGEFILTER to draw images with a transparency mask
If a png file is specified in the third parameter of IMAGEFILTER, its transparency layer is applied to all image operations. Example (the mask.png file is transparent at the edges and opaque in the center, in the shape of a rounded rectangle):
Note that to return to normal you need to use IMAGEFILTER with an empty parameter
Added I flag in TABLE to draw proportionally the canvas
Normally the canvas is drawn on the entire screen of the virtual table, if the I flag is added instead the proportions between the dimensions are maintained.
Added U/D flags in DECK for specifying if the deck is face up/down
This is used to indicate whether a specific deck should be placed face up or down (the default) on the virtual table.
Added F/B flags in TOKEN to set token in front/back
In the virtual table, tokens created with the TOKEN directive can be placed in front (flag F) or behind (flag B) the cards.
Added 2 flag to HEXGRID for interlaced coordinates Added 2 flag to FRAMEHEX for interlaced coordinates
Interlaced coordinates, unlike other systems, allow you to always use the same rule to move from one hexagon to another, as you can see in this example:
the fourth parameter in CMYK allows you to choose one of these colorspaces: AUTO/GRAY/RGB/CMYK/YCBCR/YCBCRK/YCCK (it should be indicated when the image is not displayed correctly).
Added parameter in INDEX function to find other occurrences
The syntax of the INDEX function is now:
[label]=INDEX(substring, string, number)
If the number parameter is 1, the first occurrence of the substring is found, if it is 2, the second, and so on. If it is -1, the first occurrence from left to right, if it is -2, the second, and so on.
Added number option in LINKMULTI directive
In the past, LINKMULTI had to refer to a column in the spreadsheet, now if you want each row to be reproduced multiple times, you can use LINKMULTI=number, where number is 2 to double the rows, 3 to triple them, and so on.
Added parameter in SPECIAL for line division
You can use the character ¶ to write a line of code, which will be split into two (or more) lines at execution. The fourth parameter of the SPECIAL directive allows you to change this special character.
Added * in script parameter to NANDECK directive for concurrent execution
Normally the NANDECK directive waits for the end of execution before continuing with the next line of the script; adding the * character to the parameter indicating the script to be executed will cause this to be executed in parallel, and therefore the next line of the current script will be executed immediately.
Added new rules in DECK directive
MAX1->FRAMRfrm if the item is moved in a frame already occupied, the occupying item is moved in the frame named frm; if you specify more than one frame, is used a random one from the list of frames DRAW->FRAMEfrm when a card is drawn from a deck, is placed in the frame named frm; if you specify more than one frame, is used the first free from the list of frames DRAW->FRAMRfrm when a card is drawn from a deck, is placed in the frame named frm; if you specify more than one frame, is used a random one from the list
Added option in Insert Label to perform a conversion using SEQUENCE
Added “Convert to SEQUENCE” option when inserting a label (F8), which allows you to select a label and convert its contents into lines of a SEQUENCE..ENDSEQUENCE structure.
In the 12th parameter you can specify the transparency level of the image, from 100 (solid) to 0 (full transparent).
With the G flag you can add a text to be drawn over the image, for example if you have specified (deer) as tag, the tag (deerText) writes the word “Text” over the image.
With the U flag the text is draw under the image.
In the 13th parameter you can specify a different font (defined with HTMLFONT) to be used for the text.
In the 14th and 15th parameters you can specify the position of the text relative to the image (50,50 is the default, i.e. the center of the image).
This directive draws an image using gradients created from colors read from rectangular or circular areas (specified by frames, see page 45). For this directive you can use frames defined with the standard syntax, or use this special syntax:
<frame> = x, y, width, height, special
The special parameter can be composed of one or more colors, defined with one of these syntaxes: #000000 is a color, #000000%A is a color where A is the % distance from the original frame, #000000%A$B is a color where A is the % distance from the original frame and B is a factor used to calculate the weight of this color. If you add a @ symbol to the end of the special parameter the color changes will be made from a circular shape rather than a rectangular one. If you add a ! symbol to the start of the special parameter the background is drawn also inside this shape.
Syntax:
BACKGROUND = "range", pos x, pos y, width, height, frames, flags, width, red, green, blue
“range”: a set of cards
pos x: horizontal position (in cm)
pos y: vertical position (in cm)
width: width of the rectangle (in cm)
height: height of the rectangle (in cm)
frames: the name of the frame(s) used for reading the colors
flags: one or more of the following flags:
And the distances are measured using an “Euclidean” formula (square root and powers), this is the default M the distances are measured using a “Manhattan” formula (absolutes differences) S the variation specified with red/green/blue parameters is applied when there are more than half distances between the frames that are greater than the parameter distance I the color variation specified with red/green/blue parameters is applied when there are less than half distances between the frames that are greater than the parameter distance N the color variation specified with red/green/blue parameters is applied when the number of distances between the frames that are greater than the parameter distance is an even number O the color variation specified with red/green/blue parameters is applied when the number of distances between the frames that are greater than the parameter distance is an even number
distance: the distance used with flags S, I, N, and O
red: the variation (positive or negative) of the red component used with flags S, I, N, and O
green: the variation (positive or negative) of the green component used with flags S, I, N, and O
blue: the variation (positive or negative) of the blue component used with flags S, I, N, and O
This directive sets the compression level for png images saved with a SAVE directive. The syntax is:
PNGCOMP = "range", compression, filter
Where compression is a number from 0 (no compression) to 9 (maximum compression), and filter is the method used to evaluate the difference when applying compression (can be chosen from NONE, SUB, UP, AVERAGE, and PAETH).
New TRIMSTRING function
This function removes the spaces at the start or at the end (or both) of a string/sequence, this is the syntax:
[label] = TRIMSTRING(string, flag)
Flags can be L (removes the spaces at the start of the string) and/or R (removes the spaces at the end of the string).
Added parameters in POLYGON for curved sides
The syntax now is:
POLYGON="range"Range, pos x, pos y, width, height, num sides, angle, html colorHTML color, html colorHTML color, thickness, start side, end side, zoom, factor start, factor end, radius start, radius end
The new parameters are:
factor start: if specified, each edge is drawn as a bezier curve, using this parameter as the offset factor along the tangent of the start point handle factor end: if specified, each edge is drawn as a bezier curve, using this parameter as the offset factor along the tangent of the end point handle radius start: if specified, each edge is drawn as a bezier curve, using this parameter as the offset factor along the radius of the start point handle radius end: if specified, each edge is drawn as a bezier curve, using this parameter as the offset factor along the radius of the end point handle
Added parameters in TEXTLIMIT to define standard behaviours
The syntax now is:
TEXTLIMIT="range", text ON/OFF, HTML ON/OFF
If you set one of the flags, from that moment on all TEXT or HTMLTEXT instructions will automatically activate the TEXTLIMIT command.
Added parameters in DISPLAY to read only a partial area
DISPLAY = "image file", first card, last card, width, "range", transparent color, "mask file", bitplanes, pos x, pos y, width, height
With these parameters, instead of composing the image using the entire surface of the cards, you can read only a part of it.
Added parameter in COLORCHANGE for rounded corners
The syntax now is:
COLORCHANGE = "range", pos x, pos y, width, height, html color source, html color destination, level, flags, "mask file", schema, corner rounding
The last parameter specify the corner rounding (in cm) of the COLORCHANGE area.
Added parameters in FRAMEHEX for set the scale of the grid
The syntax now is:
[label]=FRAMEHEX(pos x, pos y, width, height, hex size, flags, zoom x, zoom y, scale x, scale y)
The scale parameters (x and y) specify the distance between frames as a percentage (100 is the default). Note that the zoom parameters instead specify the scale of the frame dimensions.
Added parameter in FRAMEBEZIER to move the frames along the curve
The last parameter allows you to move the frame positions along the curve, for example, for six equally spaced points the pattern will be 0-20-40-60-80-100. Example:
Added parameters in LINK to specify fields to keep
In the parameters following the file name in the LINK directive you can indicate the fields that will be created; if they are not present in the file they will be filled with empty elements; this option is useful if you always want to maintain the same structure on different sheets (where columns can be missing in one and present in another).
Added A/K flags in HTMLTEXT to use other engines
In HTMLTEXT now you can use the A flag (an alternative internal engine, that also works on Linux) and the K flag (that uses Chrome instead of Explorer).
Added C flag in ICONS to crop images
The C flag in ICONS now works like the one in IMAGE, images retain the aspect ratio but are enlarged (unlike the P flag where the aspect ratio is maintained by reducing the image).
Added O flag in IMAGE to crop source image
With the O flag in IMAGE, the 10th to 13th parameters, instead of being used for their original purpose, serve to read only a part of the source image (the parameters correspond to x, y, width and height).
Added A flag in HTMLIMAGE to adjust also margins
When the contents of an HTMLTEXT directive are resized with the F flag, adding the A flag in HTMLIMAGE also resizes the image margins.
Added P flag in HTMLFONT for proportional font scaling with F in HTMLTEXT
When the content of an HTMLTEXT directive is resized with the F flag, if there are multiple fonts they are resized by the same value; by adding the P flag the scaling of the secondary fonts occurs proportionally with respect to the main font (indicated as the 11th parameter in HTMLTEXT).
Added P flag in BRUSH for proportional custom images
If in the BRUSH directive (with the CUSTOM option) is used the P flag, the image is drawn using the original aspect ratio.
Added F flag in SAVE to delete the file at the end
You can add the F flag to the SAVE directive if, at the end of the script execution, you don’t want to keep the image saved with it (for example for temporary images that have already been reloaded).
Added R/T/L flags in SAVE to rotate the saved image
You can rotate the image saved with the SAVE directive with the R (90°), T (180°), or L (270°) flag.
Added tags in DISPLAY to rotate the saved image
If you specify the keywords (R90), (R180), or (R270) at the start of the filename of a DISPLAY line, the resulting image is rotated accordingly.
Added ability to read WebP files
Now you can use images in the webp format with the IMAGE directive.
Added a syntax in LINKMULTI to split a text field
Instead of a number the field parameter specified by LINKMULTI can be another text field, to be divided into multiple segments, with one of these syntaxes:
field/num divides the contents of the field into segments, each of num characters field\num divides the contents of the field into segments, each composed of num characters, and the words are not divided field\num\char divides the contents of the field into segments, each composed of num characters, and words (strings separated by char) are not divided
With this special syntax you can also use three counters:
§ indicates the number of the current segment §§ indicates the total number of segments §§§ reports these two numbers separated by a slash (note: 1/1 is not displayed)
Hello everybody, there is a new version of nanDECK, with bugs fixed and new features:
New POLY directive
With this directive you can draw an irregular poygon, adding one point with each line, then close it by specifying the last point and the color. Syntax:
POLY="range", pos x1, pos y1, html color | html gradient, html color | EMPTY, thickness
This directive adds the referred bookmark (from 0 to 9) to the current line in the editor (or another, if the offset parameter is specified, positive toward the end, negative toward the start). Note that you can go to a bookmark line with CTRL+(0..9).
Syntax:
BOOKMARK=number, offset
Parameters:
number: the number of the bookmark, from 0 to 9
offset: this value is added to the current line in the editor
These bookmarks are automatically added in the validation step at the 1st istance of each directive:
#1 PAGE #2 CARDSIZE #3 LINK #4 VISUAL
New LOOKUP function
This function creates a label/sequence with the position of a label/sequence in a sequence, the syntax is:
Note: the parametes for rotation and scatter in GRADIENTS are also used in conic gradients.
Added parameter in HTMLTEXT to specify the paragraph separator
The 12th parameters in HTMLTEXT contains the font applied to each paragraph, by default the paragraphs are divided by <br>, with the new 13th parameter you can specify what is used as separator between paragraphs.
Added parameters in HTMLMARGIN for vertical stretch and rotation
The 11th and 12th parameters in HTMLMARGINS allow text to be stretched vertically and rotated in HTMLTEXT. The syntax is:
The I flag inverts the colors in the area specified in COLORCHANGE.
Added A flag in COLORCHANGE to specify more than one change
The A flag in COLORCHANGE means that instead of a single couple, a sequence of colors are changed in the correspondent colors in another sequence.
Added & parameter in alpha gradients to specify compression
In an gradients used in alpha parameter you can specify the compression factor with a & symbol and a number.
Added X flag in HTMLIMAGE to not smooth the image
As a default, images shown in HTMLTEXT using an HTMLIMAGE are smooth, but if you add the X flag in HTMLIMAGE, the smooth is removed (i.e. the image is pixelated).
Added D flag in HTMLKEY to delete a key
The D flag in HTMLKEY deletes a key already defined (i.e. the text is shown as not replaced).
Added E flag in FRAMEPER to select outer frames
Instead of adding all the frames, the FRAMEPER function with the E flag creates only the outer frames (that is, the frames in the perimeter).
Added K flag in SAVE to saved shrinked areas
With this flag, the saved images are reduced by eliminating the area with the color located in the upper left pixel of the area indicated as a parameter.
Added flag in INFO for deck size and date/time
You can use these flags in the INFO function:
N the number of cards in the deck Y year (date) M month (date) A day (date) O hour (time) I minute (time) E second (time) X epoch
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:
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:
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.