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.
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
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:
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:
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).
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.
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
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
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)
This directive sets the flags for all the directives in the script. So, for example, if you want to add BE flags in every HTMLTEXT lines, you can use a single FLAGS instead of changing every lines.
The syntax is:
FLAGS = range, directive, flags
If you want to remove a flag instead of adding, use the “-” symbol before it.
htmlfont=default,arial,16,I,#000000 htmltext=1-3,"This is a test.",0,0,100%,100%,#FFFFFF,0,,100,default
The result is a plain text in the 1st card, bold and italic in the 2nd, and bold and underlined in the 3rd.
New LINKFILL directive
This directive is used when you have a schema on several rows in a spreadsheet and you want to straighten it in a single row (using the first line to specify the total number of columns that will be filled with the cells); this directive must be used before the LINK command.
Syntax:
LINKFILL = switch
Parameter:
switch: values accepted are:
ON to enable the redistribution of the cells OFF to disable the redistribution of the cells (the default)
New EXPRESSION directive
This directive specifies the characters used to define expressions to be evaluated in texts in HTMLTEXT and RTFTEXT directives.
Syntax:
EXPRESSION = exp. HTML start, exp. HTML end, exp. RTF start, exp. RTF end
Parameters:
exp. HTML start: character(s) used to define start of expressions in HTMLTEXT directive,
exp. HTML end: character(s) used to define end of expressions in HTMLTEXT directive,
exp. RTF start: character(s) used to define start of expressions in RTFTEXT directive,
exp. RTF end: character(s) used to define end of expressions in RTFTEXT directive,
New CALC function
This function is used to get a result from a specific trigonometric function. The syntax is:
[label] = CALC(flag, value1, value2)
You can choose one of these flags:
C cosine function of value1 S sine function of value1 T tangent function of value1 P pi function (the other parameters are not used) M the higher between value1 and value2 N the lower between value1 and value2
New FRAMEMAZE function
This function reads a list of edge frames, as 1st parameter (created with a FRAMEPER function), and creates another list of edge frames, arranged as a maze. The 2nd and 3rd parameters are the width and height of the rectangle defined by the edge frames. You can specify the coordinates of the starting cell (as 4th and 5th parameter), otherwise it is randomly selected (this also when set to zero); the ending cell is selected as the farthest from the starting one. The syntax is:
[newframe] = FRAMEMAZE(frames, width, height, X start cell, Y start cell, flags)
You can use these flags in the 6th parameter:
S is created a group of frames for the solution M is created a group of frames with the sequence used in the creation of the maze E the exit is along the edge of the maze
At the end of the process other two frames are created, one for the starting cell (with postfix start) and one for the ending cell (with postfix end); if the S flag is used is created also a group of frames for the solution (with postfix solution), i.e. the path from the starting to the ending cell; if the E flag is specified is created also two frames for the edge of the starting cell (with postfix startedge) and for the ending cell (with postfix endedge); if the M flag is specified is created also a group of frames with the sequence used for creating the maze (with postfix map).
This example creates two cards, one with the maze, starting and ending cells, and one that adds the solution:
If the result of the COOICON function corresponds to multiple icons, you can use the 5th parameter to select one of these.
Added parameters in ORIGIN for the % of the cards
The 4th parameter in ORIGIN sets the value in % for the width of the card (the default is 100), similarly, the 5th parameter is for the height.
Added parameter in SAVE for depth of saved files
The 12th parameter in SAVE sets the depth of the saved image, and can be set equal to:
24 16 millions of colors (the default) 16 65536 colors 8 256 colors 4 16 colors
Added parameter in FONT, FONTRANGE, and TEXTFONT for the spacing of circular text
The default behavior for the circular text is to justified. With this parameter you can specify the actual spacing between characters (zero, or a positive/negative value in cm or the current unit); note that with this parameter is used the horizontal alignment (left/center/right). This parameter is present in FONT (10th), FONTRANGE (11th), or TEXTFONT (19th).
Added J/G flags in HTMLTEXT for enlarging/evening lines of text
The F flag is currently use to shrink a font if text is not contained in the HTMLTEXT rectangle; similarly, a J flag enlarge a font until the text is not contained in the HTMLTEXT rectangle. The G flag reduces the width of the text to obtains lines of the same width.
Added W/V/F flags in HTMLFONT for upper/lower/firstcase of text
W the text is converted to upper case V the text is converted to lower case F the first letter of the text is converted to upper case, the others to lower
Added H/V flags in CANVAS for centering the canvas in the cards
The default for the cutting of the canvas images in single cards is to align to the top-left corner, with these flags the images are centered.
And some features in the editor: F11 on a font name shows you the next one (CTRL+F11 for the previous one), F12 opens the reference (and download it if the file is not present).
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
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:
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:
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.
Hello everybody, a new version of nanDECK is available, with bugs fixed and new features:
New CMYK directive
The CMYK command has this syntax:
CMYK = Range, ON/OFF, ICC profile
The ON flag enable the CMYK color profile when saving .jpg images, and optionally you can specify an .icc / .icm color profile (or another .jpg to read its profile).
New TAGS directive
This directive creates a rule that is evaluated in the Simulator (a new feature, albeit still basic). The rule can contain series of letters of numbers, with this syntax:
one or more “$” symbol, then letters to define a tag’s value that is present, using the same letter means that the same element is present with that number of copies,
one or more “£” symbol, then numbers to define the difference between the values of tag when multiple copies are present (i.e. in a straight); with the !N>M syntax is defined that a tag with value N is treated also like M (i.e. the ace in a straight can be positioned before the 2 or after the King),
one or more “=” symbol, then one or more tags that must be present.
You can specify more than one rule for a single directive, all of which will be evaluated at the same time, by separating each rule (and each tag) with the pipe character “|”.
Example (poker probability):
tag=1-52,value,1|2|3|4|5|6|7|8|9|10|11|12|13 tag=1-13,suite,1 tag=14-26,suite,2 tag=27-39,suite,3 tag=40-52,suite,4 tags=suite|value,$aaaaa|==1011121301,Royal flush tags=suite|value,$aaaaa|£1111!1>14,Straight flush tags=value,$aaaab,Four of a kind tags=value,$aabbb,Full house tags=suite,$aaaaa,Flush tags=value,£1111!1>14,Straight tags=value,$aaabc,Three of a kind tags=value,$aabbc,Two pairs tags=value,$aabcd,One pair tags=value,$abcde,No pair
New RANGELABEL function
This function converts a sequence of numbers into a range:
[label] = RANGELABEL([sequence])
New RANGEMERGE function
This function creates a new range mixing the cards from two or more ranges:
Added parameters in DISPLAY directive for transparency
Syntax:
DISPLAY = “image file”, first card, last card, width, “range”, transparent color, “mask file”
The last two parameters can be used to save an image file with a transparency, and are used the same way as the parameters in SAVE directive.
Added parameters in SAVEPAGES directive for CMYK format
Syntax:
SAVEPAGES = “filename”, switch, color profile
Switch and color profile are the same as in CMYK directive.
Added V, S, C, and E flags in BATCH directive
The flag added after the batch specifies when the batch is executed, i.e.:
V the batch is executed at the validation step S the batch is executed at the start of the build step C the batch is executed at the end of each built card E the batch is executed at the end of the build step
Added D flag in HTMLIMAGE to disable size adjustment
Usually the images in the HTMLIMAGE directive are drawn rescaled in HTMLTEXT (if using the F flag), with the D flag that behavior is disabled (and the images are drawn with the size specified).
Added H flag in HTMLIMAGE to disable vertical spacing
If the height of an image in HTMLIMAGE directive is higher than a character in HTMLTEXT, the lines are drawn with more space between each other, instead with the H flag the lines are drawn more closer.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookies
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.