| ← Previous | ↑ Home | → Next |
The following symbols are used later in this text.
| Symbol | Use |
|---|---|
| MAX | Maximum colour component value for a given bit depth, i. e. 255 for a bit depth of 8. |
| r | Red component, 0≤r≤MAX. |
| g | Green component, 0≤g≤MAX. |
| b | Blue component, 0≤b≤MAX. |
| e | Gray value, 0≤e≤MAX. |
| c | Cyan component, 0≤c≤MAX. |
| m | Magenta component, 0≤m≤MAX. |
| y | Yellow component, 0≤y≤MAX. |
| k | Key (black) component, 0≤k≤MAX. |
| maxrgb | Maximum value of r, g, and b. |
| max{x1, x2…} | Maximum of the listed values. |
| min{x1, x2…} | Minimum of the listed values. |
| median{x1, x2…} | Median of the listed values. |
| Symbol | Use |
|---|---|
| l | Real line width. |
| la | Arrowhead length. |
| wa | Arrowhead width. |
| s | Shift length between corner point and arrowhead end. |
| Symbol | Use |
|---|---|
| cf,r | Red component of fill and text colour. |
| cf,g | Green component of fill and text colour. |
| cf,b | Blue component of fill and text colour. |
| cs,r | Red component of stroke colour. |
| cs,g | Green component of stroke colour. |
| cs,b | Blue component of stroke colour. |
| lb | Base line width in wxdkdraw units. |
| l | Line width in integer multiples of the base line width lb. |
| z | Zoom level, integer value. |
| sl | Style length, length of dashes in integer multiples of the line width. |
| xl | Left x coordinate. |
| xr | Right x coordinate. |
| yb | Bottom y coordinate. |
| yt | Top y coordinate. |
All numeric values are specified in decimal notation.
UTF-8 encoding is used for all text, this includes text labels and file names of embedded images.
Single drawing
Each wxdkdraw file contains exactly one drawing.
Origin
The coordinates origin is the bottom left point. x values grow to the right, y values grow upwards.
Resolution
Coordinates are signed 32 bit integer values, negative values are allowed.
16,256,000 wxdkdraw units are used per inch.
Angles
Angles are specified counterclockwise in degree.
Image size
A wxdkdraw drawing is not bound to a specific paper size. The image size in wxdkdraw units is specified as bounding box in a configuration record.
Each graphic element is placed on a certain layer. Signed 16 bit integer values are used for layer numbers. −215 is the deepest layer, 215−1 is the uppermost layer.
Graphic elements can be grouped. Copy, Move and Delete operations affect all elements of a group.
Line widths are specified in unsigned integer multiples of the base line width lb. By default the base line width is 12700 wxdkdraw units ( inch).
For export you have the option to change the base line width, i. e. to 11247 units (0.4pt).
Elements with line width 0 are not stroked.
The style length sl specifies the dash length in dash-dot lines in integer multiples of the line width. Changing the line width while keeping sl automatically adjusts the dash-dot pattern.
Minimum is 1, maximum is 255.
The dot length is the line width. The gap length is the minimum of:
| Style number | Style |
|---|---|
| 0 | Solid line. |
| 1 | Dashed line. |
| 2 | Dotted line. |
| 3 | Dash-dot line. |
| 4 | Dash-dot-dot line. |
| 5 | Dash-dot-dot-dot line. |
| Style number | Style |
|---|---|
| 0 | Butted |
| 1 | Rounded (half circle added) |
| 2 | Projecting (half square added) |
| Style number | Style |
|---|---|
| 0 | Mitered |
| 1 | Rounded |
| 2 | Beveled |
The miter limit m is active for “mitered”. The distance between intersection of the outer edges and intersection of the inner edges must not exceed m times the linewidth.
| Style number | Style |
|---|---|
| 0 | No filling. |
| 1 | Pure colour filling. |
| 2 | Diagonal lines 30° to the left. |
| 3 | Diagonal lines 30° to the right. |
| 4 | Diagonal lines 30° crosshatch. |
| 5 | Diagonal lines 45° to the left. |
| 6 | Diagonal lines 45° to the right. |
| 7 | Diagonal lines 45° crosshatch. |
| 8 | Horizontal bricks. |
| 9 | Vertical bricks. |
| 10 | Horizontal lines. |
| 11 | Vertical lines. |
| 12 | Horizontal-vertical crosshatch. |
| 13 | Horizontal shingles skewed to the right. |
| 14 | Horizontal shingles skewed to the left. |
| 15 | Vertical shingles skewed to one side. |
| 16 | Vertical shingles skewed to the other side. |
| 17 | Fish scales. |
| 18 | Small fish scales. |
| 19 | Circles. |
| 20 | Hexagons. |
| 21 | Octagons. |
| 22 | Horizontal zigzag lines. |
| 23 | Vertical zigzag lines. |
The image below shows fill styles 0 to 23.
The image below shows the available arrowhead types in wxdkdraw.
A wxdkdraw file is a text file you should process line by line.
Line size — including line ends (simple newline or CR/NL combination) — is restricted to 1023 characters.
A *.wxd file consists of a header line and records.
WXD major minor
| Type | Name or value | Description |
|---|---|---|
| string | WXD | Constant text “WXD” to mark the file type. |
| uint16_t | major | Major file format version number (1). |
| uint16_t | minor | Minor file format version number (0). |
For each record there is a start line. For some record types details lines follow.
A start line starts immediately at the start of the line without leading spaces.
Details lines are intended by exactly one space or exactly one tabulator.
On problems while processing a record — i. e. an old program version attempts to read a file in a newer format version — the program can attempt to resume reading the file on the next record start line when encountering an unknown record type.
All configuration records must be placed before the first graphic element record.
Configuration records are started by a leading 0. Another integer number follows to choose a configuration option. Next we have configuration values.
0 0 xl xr yb yt
| Type | Name or value | Description |
|---|---|---|
| int16_t | 0 | Record type: Configuration record. |
| int16_t | 0 | Sub type: Bounding box. |
| int32_t | xl | Left x coordinate in wxdkdraw units. |
| int32_t | xr | Right x coordinate in wxdkdraw units. |
| int32_t | yb | Bottom y coordinate in wxdkdraw units. |
| int32_t | yt | Top y coordinate in wxdkdraw units. |
The bounding box record is required in each wxdkdraw file.
0 1 lb
| Type | Name or value | Description |
|---|---|---|
| int16_t | 0 | Record type: Configuration record. |
| int16_t | 1 | Sub type: Base line width. |
| uint32_t | lb | Base line width in wxdkdraw units. |
This record is optional, it should only be used if the base line width differs from the default line width ( inch).
0 2 z
| Type | Name or value | Description |
|---|---|---|
| int16_t | 0 | Record type: Configuration record. |
| int16_t | 2 | Sub type: Zoom level. |
| int8_t | z | Zoom level, -14≤z≤14. |
This record is optional. By default a zoom level 0 (zoom factor 100 %) is used.
Positive zoom levels are used to zoom in, negative zoom levels are used to zoom out.
Each zoom level step changes the zoom by factor .
0 4 bl br bb bt
| Type | Name or value | Description |
|---|---|---|
| int16_t | 0 | Record type: Configuration record. |
| int16_t | 4 | Sub type: Borders. |
| uint32_t | bl | Left border in wxdkdraw units. |
| uint32_t | br | Right border in wxdkdraw units. |
| uint32_t | bb | Bottom border in wxdkdraw units. |
| uint32_t | bt | Top border in wxdkdraw units. |
This record is optional. One inch borders are used by default.
0 5 u
| Type | Name or value | Description |
|---|---|---|
| int16_t | 0 | Record type: Configuration record. |
| int16_t | 5 | Sub type: Grid unit. |
| uint8_t | u | Grid unit:
|
This record is optional. Inches are used by default.
0 6 b
| Type | Name or value | Description |
|---|---|---|
| int16_t | 0 | Record type: Configuration record. |
| int16_t | 6 | Sub type: Grid base. |
| uint8_t | b | Grid base:
|
This record is optional. Powers of two are used by default.
For zoom level 0 grid setup is used as follows:
| Unit | Base | Optical grid | Snap grid |
|---|---|---|---|
| 0 (inches) | 0 (powers of 2) | 2 / inch | 8 / inch |
| 0 (inches) | 1 (5 · powers of 2) | 2 / inch | 10 / inch |
| 1 (cm) | 0 (powers of 2) | 1 / cm | 4 / cm |
| 1 (cm) | 1 (5 · powers of 2) | 1 / cm | 5 / cm |
1
| Type | Name or value | Description |
|---|---|---|
| int16_t | 1 | Record type: Start of group. |
-1
| Type | Name or value | Description |
|---|---|---|
| int16_t | -1 | Record type: End of group. |
2 L cf,r cf,g cf,b
if sf ah f x y α
t
ts
| Type | Name or value | Description |
|---|---|---|
| int16_t | 2 | Record type: Text label. |
| int16_t | L | Layer number. |
| uint8_t | cf,r | Text colour, red component. |
| uint8_t | cf,g | Text colour, green component. |
| uint8_t | cf,b | Text colour, blue component. |
The first details line specifies text representation and coordinates:
| Type | Name or value | Description |
|---|---|---|
| uint8_t | if | Font index, 0≤if≤34. |
| uint16_t | sf | Font size in pt (the LaTeX unit pt, 72,26999 pt = 1 inch). |
| uint8_t | ah | Horizontal alignment:
|
| uint8_t | f | Flags, bitwise combination of:
|
| int32_t | x | Text anchor x coordinate in wxdkdraw units. |
| int32_t | y | Text anchor y coordinate in wxdkdraw units. |
| int16_t | α | Rotation counter-clockwise in degree. |
The second details line contains the text to export (the “real” text):
| Type | Name or value | Description |
|---|---|---|
| string | t | Text to export, the “real” text. |
The third details line contains a simplified text shown on the screen:
| Type | Name or value | Description |
|---|---|---|
| string | ts | Text to show on screen in wxdkdraw (simplified version of t). |
If the third details line contains just a leading space/tabulator and the line end the export text is used for on-screen representation too.
The on-screen text should be a simplified version of the export text. If you want to export “\(R_1\)” for LaTeX, use an on-screen text “R1”.
Text must not contain newlines. Multi-line text must be specified in multiple text label records.
The text must not contain more than 1020 characters.
The font index if chooses a font from the table below.
For special text (LaTeX text) font index and font size are ignored. Use LaTeX instructions in the text instead.
| Font index if | Font |
|---|---|
| 0 | Times Roman |
| 1 | Times Italic |
| 2 | Times Bold |
| 3 | Times Bold Italic |
| 4 | Avantgarde Book |
| 5 | Avantgarde Book Oblique |
| 6 | Avantgarde Demi |
| 7 | Avantgarde Demi Oblique |
| 8 | Bookman Light |
| 9 | Bookman Light Italic |
| 10 | Bookman Demi |
| 11 | Bookman Demi Italic |
| 12 | Courier |
| 13 | Courier Oblique |
| 14 | Courier Bold |
| 15 | Courier Bold Oblique |
| 16 | Helvetica |
| 17 | Helvetica Oblique |
| 18 | Helvetica Bold |
| 19 | Helvetica Bold Oblique |
| 20 | Helvetica Narrow |
| 21 | Helvetica Narrow Oblique |
| 22 | Helvetica Narrow Bold |
| 23 | Helvetica Narrow Bold Oblique |
| 24 | New Century Schoolbook Roman |
| 25 | New Century Schoolbook Italic |
| 26 | New Century Schoolbook Bold |
| 27 | New Century Schoolbook Bold Italic |
| 28 | Palatino Roman |
| 29 | Palatino Italic |
| 30 | Palatino Bold |
| 31 | Palatino Bold Italic |
| 32 | Symbol |
| 33 | Zapf Chancery Medium Italic |
| 34 | Zapf Dingbats |
3 n L cs,r cs,g cs,b l ss sl c j m af la,f wa,f ab la,b wa,b
x1 y1
…
| Type | Name or value | Description |
|---|---|---|
| int16_t | 3 | Record type: Polyline. |
| uint16_t | n | Number of points, at least 2. |
| int16_t | L | Layer number. |
| uint8_t | cs,r | Stroke colour, red component. |
| uint8_t | cs,g | Stroke colour, green component. |
| uint8_t | cs,b | Stroke colour, blue component. |
| uint16_t | l | Line width in integer multiples of the base line width. |
| uint8_t | ss | Line style. |
| uint8_t | sl | Style length. |
| uint8_t | c | Line cap style. |
| uint8_t | j | Line join style. |
| uint8_t | m | Miter limit. |
| uint8_t | af | Arrowhead type, forward arrowhead. |
| uint8_t | la,f | Arrowhead length, forward arrowhead. |
| uint8_t | wa,f | Arrowhead width, forward arrowhead. |
| uint8_t | ab | Arrowhead type, backward arrowhead. |
| uint8_t | la,b | Arrowhead length, backward arrowhead. |
| uint8_t | wa,b | Arrowhead width, backward arrowhead. |
There are n details lines containing point coordinates:
| Type | Name or value | Description |
|---|---|---|
| int32_t | xi | X position. |
| int32_t | yi | Y position. |
4 n L cs,r cs,g cs,b l ss sl c j m af la,f wa,f ab la,b wa,b
x1 y1 s1
…
| Type | Name or value | Description |
|---|---|---|
| int16_t | 4 | Record type: Open X-spline. |
| uint16_t | n | Number of points, at least 2. |
| int16_t | L | Layer number. |
| uint8_t | cs,r | Stroke colour, red component. |
| uint8_t | cs,g | Stroke colour, green component. |
| uint8_t | cs,b | Stroke colour, blue component. |
| uint16_t | l | Line width in integer multiples of the base line width. |
| uint8_t | ss | Line style. |
| uint8_t | sl | Style length. |
| uint8_t | c | Line cap style. |
| uint8_t | j | Line join style. |
| uint8_t | m | Miter limit. |
| uint8_t | af | Arrowhead type, forward arrowhead. |
| uint8_t | la,f | Arrowhead length, forward arrowhead. |
| uint8_t | wa,f | Arrowhead width, forward arrowhead. |
| uint8_t | ab | Arrowhead type, backward arrowhead. |
| uint8_t | la,b | Arrowhead length, backward arrowhead. |
| uint8_t | wa,b | Arrowhead width, backward arrowhead. |
There are n details lines containing point coordinates and s parameter value:
| Type | Name or value | Description |
|---|---|---|
| int32_t | xi | X position. |
| int32_t | yi | Y position. |
| float | si | S parameter value, -1≤s≤1. |
5 L cs,r cs,g cs,b l ss sl c af la,f wa,f ab la,b wa,b
x1 y1 x2 y2 x3 y3
| Type | Name or value | Description |
|---|---|---|
| int16_t | 5 | Record type: Open arc. |
| int16_t | L | Layer number. |
| uint8_t | cs,r | Stroke colour, red component. |
| uint8_t | cs,g | Stroke colour, green component. |
| uint8_t | cs,b | Stroke colour, blue component. |
| uint16_t | l | Line width in integer multiples of the base line width. |
| uint8_t | ss | Line style. |
| uint8_t | sl | Style length. |
| uint8_t | c | Line cap style. |
| uint8_t | af | Arrowhead type, forward arrowhead. |
| uint8_t | la,f | Arrowhead length, forward arrowhead. |
| uint8_t | wa,f | Arrowhead width, forward arrowhead. |
| uint8_t | ab | Arrowhead type, backward arrowhead. |
| uint8_t | la,b | Arrowhead length, backward arrowhead. |
| uint8_t | wa,b | Arrowhead width, backward arrowhead. |
The details line contains the coordinates of the 3 points clicked:
| Type | Name or value | Description |
|---|---|---|
| int32_t | x1 | X position point 1. |
| int32_t | y1 | Y position point 1. |
| int32_t | x2 | X position point 2. |
| int32_t | y2 | Y position point 2. |
| int32_t | x3 | X position point 3. |
| int32_t | y3 | Y position point 3. |
6 n L cs,r cs,g cs,b cf,r cf,g cf,b l ss sl j m sf
x1 y1
…
| Type | Name or value | Description |
|---|---|---|
| int16_t | 6 | Record type: Polygon (closed polyline). |
| uint16_t | n | Number of points, at least 2. |
| int16_t | L | Layer number. |
| uint8_t | cs,r | Stroke colour, red component. |
| uint8_t | cs,g | Stroke colour, green component. |
| uint8_t | cs,b | Stroke colour, blue component. |
| uint8_t | cf,r | Fill colour, red component. |
| uint8_t | cf,g | Fill colour, green component. |
| uint8_t | cf,b | Fill colour, blue component. |
| uint16_t | l | Line width in integer multiples of the base line width. |
| uint8_t | ss | Line style. |
| uint8_t | sl | Style length. |
| uint8_t | j | Line join style. |
| uint8_t | m | Miter limit. |
| uint8_t | sf | Fill style. |
There are n details lines containing point coordinates:
| Type | Name or value | Description |
|---|---|---|
| int32_t | xi | X coordinate. |
| int32_t | yi | Y coordinate. |
The start point is not repeated as end point.
7 n L cs,r cs,g cs,b cf,r cf,g cf,b l ss sl j m sf
x1 y1 s1
…
| Type | Name or value | Description |
|---|---|---|
| int16_t | 7 | Record type: Closed X-spline. |
| uint16_t | n | Number of points, at least 2. |
| int16_t | L | Layer number. |
| uint8_t | cs,r | Stroke colour, red component. |
| uint8_t | cs,g | Stroke colour, green component. |
| uint8_t | cs,b | Stroke colour, blue component. |
| uint8_t | cf,r | Fill colour, red component. |
| uint8_t | cf,g | Fill colour, green component. |
| uint8_t | cf,b | Fill colour, blue component. |
| uint16_t | l | Line width in integer multiples of the base line width. |
| uint8_t | ss | Line style. |
| uint8_t | sl | Style length. |
| uint8_t | j | Line join style. |
| uint8_t | m | Miter limit. |
| uint8_t | sf | Fill style. |
There are n details lines containing point coordinates and spline value:
| Type | Name or value | Description |
|---|---|---|
| int32_t | xi | X coordinate. |
| int32_t | yi | Y coordinate. |
| float | si | s value for point, -1≤s≤1. |
The start point is not repeated as end point.
8 L cs,r cs,g cs,b cf,r cf,g cf,b l ss sl j m sf
x1 y1 x2 y2 x3 y3
| Type | Name or value | Description |
|---|---|---|
| int16_t | 8 | Record type: Closed arc. |
| int16_t | L | Layer number. |
| uint8_t | cs,r | Stroke colour, red component. |
| uint8_t | cs,g | Stroke colour, green component. |
| uint8_t | cs,b | Stroke colour, blue component. |
| uint8_t | cf,r | Fill colour, red component. |
| uint8_t | cf,g | Fill colour, green component. |
| uint8_t | cf,b | Fill colour, blue component. |
| uint16_t | l | Line width in integer multiples of the base line width. |
| uint8_t | ss | Line style. |
| uint8_t | sl | Style length. |
| uint8_t | j | Line join style. |
| uint8_t | m | Miter limit. |
| uint8_t | sf | Fill style. |
The details line contains the coordinates of the 3 points clicked:
| Type | Name or value | Description |
|---|---|---|
| int32_t | x1 | X position point 1. |
| int32_t | y1 | Y position point 1. |
| int32_t | x2 | X position point 2. |
| int32_t | y2 | Y position point 2. |
| int32_t | x3 | X position point 3. |
| int32_t | y3 | Y position point 3. |
9 L cs,r cs,g cs,b cf,r cf,g cf,b l ss sl sf
x y r
| Type | Name or value | Description |
|---|---|---|
| int16_t | 9 | Record type: Circle. |
| int16_t | L | Layer number. |
| uint8_t | cs,r | Stroke colour, red component. |
| uint8_t | cs,g | Stroke colour, green component. |
| uint8_t | cs,b | Stroke colour, blue component. |
| uint8_t | cf,r | Fill colour, red component. |
| uint8_t | cf,g | Fill colour, green component. |
| uint8_t | cf,b | Fill colour, blue component. |
| uint16_t | l | Line width in integer multiples of the base line width. |
| uint8_t | ss | Line style. |
| uint8_t | sl | Style length. |
| uint8_t | sf | Fill style. |
The details line contains the coordinates:
| Type | Name or value | Description |
|---|---|---|
| int32_t | x | Center point X position. |
| int32_t | y | Center point Y position. |
| uint32_t | r | Radius. |
13 L cf,r cf,g cf,b
x y d
| Type | Name or value | Description |
|---|---|---|
| int16_t | 13 | Record type: Colour filled dot. |
| int16_t | L | Layer number. |
| uint8_t | cf,r | Fill colour, red component. |
| uint8_t | cf,g | Fill colour, green component. |
| uint8_t | cf,b | Fill colour, blue component. |
The details line contains the coordinates:
| Type | Name or value | Description |
|---|---|---|
| int32_t | x | Center point X position. |
| int32_t | y | Center point Y position. |
| uint16_t | d | Diameter in integer multiples of the base line width. |
The filled dot is used in electronic circuits to mark electrical connections on crossing nets.
It is placed by center point.
14 L cs,r cs,g cs,b
x y d l
| Type | Name or value | Description |
|---|---|---|
| int16_t | 14 | Record type: White filled dot. |
| int16_t | L | Layer number. |
| uint8_t | cs,r | Fill colour, red component. |
| uint8_t | cs,g | Fill colour, green component. |
| uint8_t | cs,b | Fill colour, blue component. |
The details line contains the coordinates:
| Type | Name or value | Description |
|---|---|---|
| int32_t | x | Center point X position. |
| int32_t | y | Center point Y position. |
| uint16_t | d | Diameter in integer multiples of the base line width. |
| uint16_t | l | Line width of stroked border, l≤d. |
The white filled dot is used in electronic circuits to mark pins at the end of a net.
It is placed by center point.
10 L cs,r cs,g cs,b cf,r cf,g cf,b l ss sl sf
x y rx ry α
| Type | Name or value | Description |
|---|---|---|
| int16_t | 10 | Record type: Ellipse. |
| int16_t | L | Layer number. |
| uint8_t | cs,r | Stroke colour, red component. |
| uint8_t | cs,g | Stroke colour, green component. |
| uint8_t | cs,b | Stroke colour, blue component. |
| uint8_t | cf,r | Fill colour, red component. |
| uint8_t | cf,g | Fill colour, green component. |
| uint8_t | cf,b | Fill colour, blue component. |
| uint16_t | l | Line width in integer multiples of the base line width. |
| uint8_t | ss | Line style. |
| uint8_t | sl | Style length. |
| uint8_t | sf | Fill style. |
The details line contains the coordinates:
| Type | Name or value | Description |
|---|---|---|
| int32_t | x | X coordinate. |
| int32_t | y | Y coordinate. |
| uint32_t | rx | X radius. |
| uint32_t | ry | Y radius. |
| int16_t | α | Rotation counterclockwise in degree. |
11 L cs,r cs,g cs,b cf,r cf,g cf,b l ss sl sf
xl xr yb yt r
| Type | Name or value | Description |
|---|---|---|
| int16_t | 11 | Record type: Box. |
| int16_t | L | Layer number. |
| uint8_t | cs,r | Stroke colour, red component. |
| uint8_t | cs,g | Stroke colour, green component. |
| uint8_t | cs,b | Stroke colour, blue component. |
| uint8_t | cf,r | Fill colour, red component. |
| uint8_t | cf,g | Fill colour, green component. |
| uint8_t | cf,b | Fill colour, blue component. |
| uint16_t | l | Line width in integer multiples of the base line width. |
| uint8_t | ss | Line style. |
| uint8_t | sl | Style length. |
| uint8_t | sf | Fill style. |
The details line contains the coordinates.
| Type | Name or value | Description |
|---|---|---|
| int32_t | xl | Left X coordinate. |
| int32_t | xr | Right X coordinate. |
| int32_t | yb | Bottom Y coordinate. |
| int32_t | yt | Top Y coordinate. |
| uint32_t | r | Corner radius (0 for simple rectangle). |
The rounded corners radius must be smaller than half the smaller rectangle side length.
12 L cf,r cf,g cf,b
f mrgb2gray mrgb2cmyk x y w h
nf
| Type | Name or value | Description |
|---|---|---|
| int16_t | 12 | Record type: Embedded image. |
| int16_t | L | Layer number. |
| uint8_t | cf,r | Fill colour, red component. |
| uint8_t | cf,g | Fill colour, green component. |
| uint8_t | cf,b | Fill colour, blue component. |
The background colour is only used if the image contains an alpha channel and no background colour information.
The first details line contains flags and coordinates:
| Type | Name or value | Description |
|---|---|---|
| uint8_t | f | Flags, see table below. |
| int8_t | mrgb2gray | Method for RGB to gray conversion. |
| int8_t | mrgb2cmyk | Method for RGB to CMYK conversion. |
| int32_t | x | X position of lower left point. |
| int32_t | y | Y position of lower left point. |
| uint32_t | w | Image width (must be larger than 0). |
| uint32_t | h | Image height (must be larger than 0). |
The second details line contains the image file name:
| Type | Name or value | Description |
|---|---|---|
| string | nf | Image file name. |
UTF-8 encoding is used for the file name. I recommend to use ASCII characters only in file names.
Relative file names should be used.
The flags f value is an or-combination of the following bits (bit 0 is the least significant bit on the right):
| Bit number | Purpose |
|---|---|
| 0 | Keep aspect ratio:
|
| 1 | Use opacity value from alpha channel:
|
| 2 | Allow image interpolation:
|
| 3 | Allow direct re-use of DCT-compressed data:
|
| 4 | Allow image interpolation on directly re-used DCT data:
|
| 5 | Enforce background colour from WXD file:
|
The following mrgb2gray values can be used to choose the RGB to gray conversion method:
| Value | Formula | Method |
|---|---|---|
| -1 | Default method. | |
| 0 | Keep luminance as specified by ITU BT601. | |
| 1 | Alternative method to keep luminance (shorter coefficients). | |
| 2 | Fast and a little inaccurate by avoiding divisions. | |
| 3 | Faster and more inaccurate by avoiding both multiplications and divisions. | |
| 4 | Keep luminance as specified by ITU BT709. | |
| 5 | Average. | |
| 6 | Desaturation. | |
| 7 | Minimum decomposition. | |
| 8 | Median decomposition. | |
| 9 | Maximum decomposition. | |
| 10 | Red channel. | |
| 11 | Green channel. | |
| 12 | Blue channel. |
The following mrgb2cmyk values can be used to choose the RGB to CMYK conversion method:
| Value | Method |
|---|---|
| -1 | Default method (same as 0). |
| 0 | Algorithm as not described in Adobe PS and PDF standard. |
| 1 | Simplified algorithm from Adobe PS and PDF standard without undercolor removal and black correction. |
The mrgb2cmyk value is ignored, wxd2lat produces RGB or gray output only.
Algorithm 0:
maxrgb = max{r,g,b}
if 0 = maxrgb
then
k = MAX
c = m = y = 0
else
c = maxrgb - r
m = maxrgb - g
y = maxrgb - b
c = (MAX * c) / maxrgb
m = (MAX * m) / maxrgb
y = (MAX * y) / maxrgb
k = MAX - maxrgb
endif
Algorithm 1:
maxrgb = max{r,g,b}
c = maxrgb - r
m = maxrgb - g
y = maxrgb - b
k = MAX - maxrgb
| ← Previous | ↑ Home | → Next |