| ← Previous | ↑ Home | ↑ Programs | → Next |
Wxdkdraw is a minimalistic drawing program for use in LaTeX environments. You can use it for all drawing types placing graphic objects on a rectangular grid.
The [wxd2lat] program converts wxdkdraw drawings to file formats for use with (pdf)LaTeX.
In wxdkdraw you specify the operation first, operands (objects to operate on) later. After selecting an operation the program activates an appropriate mode, so you can select suitable objects only.
Once you choosed an operation and you are about to select an object, selection candidates are highlighted while you move the mouse. The following colours are used for highlighting:
Highlighting means the object is drawn in the highlighting colour. Additionally the control points are marked by squares larger than the line width, so you can identify highlighted objects even when object colour and highlighting colour are the same.
For point-related operations the entire object is marked in light blue, a small square is used to highlight the candidate control point.
The origin is in the lower left corner, x values grow to the right, y values grow upwards.
Coordinates are saved as 32 bit signed integers, negative values are allowed.
Wxdkdraw does not use fixed paper sizes for drawings. You can choose any drawing size you need and change the drawing size as often as necessary. The drawing size is saved in the drawing file as x coordinates for left and right border and y coordinates for bottom and top border.
The optical grid is shown by horizontal and vertical lines.
You can choose an inch-based or a centimeter-based grid.
For zoom factor 1 (100%) the optical grid step is a half inch for inch-based grids, 1 centimeter for centimeter-based grids.
Each optical grid step is divided into 4 or 5 steps to build the magnetic grid (or snap grid). All graphic objects are aligned to the magnetic grid.
Both optical grid and magnetic grid are dynamic: If you change the zoom factor (i.e. when zooming into the drawing) grid steps follow the zoom factor.
So zooming into the drawing not only allows a more detailed view, it also allows more detailed drawing.
You can combine graphic objects to groups. A copy, move, delete, flip or rotate operation affects the entire group.
In addition to coordinates graphic elements contain representation information: layer, stroke colour, line width, line style, join style, cap style, forward and backward arrowheads, fill colour, fill style, LaTeX text option, text alignment, font, text size and rotation.
The default style attributes are assigned to all new objects at creation time.
If you plan to create multiple graphic objects in same style, you should set up the default style attributes first before creating the objects.
Each graphic object is placed on a layer. The layer number is a signed 16 bit integer number. Lower numbers are for deeper layers, larger numbers for upper layers.
Graphic objects in lower layers are drawn first, objects in upper layers are drawn later. Objects in upper layers can cover or hide objects in deeper layers.
The additive RGB colour model is used internally.
You can choose colours from a palette or use the system colour chooser dialog. Colours from palettes can be lightened (mixed against white) and darkened (mixed against black).
The line width is specified in unsigned integer multiples of the base line width. The base line width is 1/160 inch.
Line width 2 in wxdkdraw corresponds to line width 1 in XFig.
The following line styles are available:
The style value configures the dash length in multiples of the line length. 4 is a reasonable value in most situations.
The following join styles are available:
The following line cap styles are available:
30 different arrowheads (including "no arrowhead") are available. Most arrowheads require to specify arrowhead length and width (in multiples of the line width).
The image below shows all arrowhead types applied to polylines, arcs and open and closed splines.
In addition to "no fill" and "colour fill" you can choose from a number of fill patterns.
The "LaTeX" option chooses how to convert a text label to LaTeX output. For LaTeX text no conversion of special characters to LaTeX commands is applied. No information about font type and size is written to output.
Non-LaTeX text labels must not contain non-ASCII characters when producing a document.
Text alignment choices are:
For non-LaTeX text there are 35 fonts available.
For non-LaTeX text you can specify a text size in pt.
For texts and ellipses you can specify a rotation counterclockwise in degree.
WYSIWYG is not completely available in wxdkdraw, some graphic objects are drawn simplified to keep the wxdkdraw program responsive.
In LaTeX output lines are shortened so arrowheads end in the specified end point of the line. Wxdkdraw does not shorten lines.
In LaTeX output curved arrowheads are produced on curved lines (arcs and splines). In wxdkdraw simple straight arrowheads are used.
In wxdkdraw texts are not shown in the font configured, a font with similar features is used instead.
For LaTeX text labels the screen text is shown instead of the export text.
The following types of graphic objects are available:

In addition to menu and drawing area the main window contains some groups of controls.


After zooming out or resetting zoom I recommend to use the "View → Center view" menu item















The texts show the actions you can perform using the mouse buttons.

The cursor position is shown here in the unit choosen for the grid.

For some operating modes the status line shows additional information.
Click the Open file button. If the current drawing contains unsaved changes you are asked whether you want to save the drawing.
The file chooser dialog "Open drawing" is shown. Choose the *.wxd file you want to open.
Click the Save file button. If the file name is not yet known, a file chooser dialog is shown to specify the file name.
If the drawing was saved successfully, the "unsaved changes" marker - an asterisk before the file name in the window title - is removed.
Click the Drawing size button. The program goes to the "select drawing size corner" mode. The drawing size is shown by a blue rectangle.
Click one of the corner points to move it. The corner point is attached to the mouse. The program goes to "place corner point" mode.
Click on the new position to place the corner point. The program goes back to "select drawing size corner" mode. You can either select another corner point to move or right-click to go back to "no operation" mode.
After changing the drawing size I recommend to use the "View → Center View" menu item.
Typically you choose a drawing size larger than needed while drawing. When the drawing is finished, reduce the drawing size to the region really needed.
When wxdkdraw is started, the program is in "no operation" mode and has no object currently selected.
The style controls are connected to the default styles, so you can modify the default values assigned to new objects.
When moving the mouse across the drawing objects near to the mouse are hightlighted as selection candidates. Click the mouse to select an object. The control points of the selected object are highlighted by stroked blue squares, the style controls are connected to the selected element. You can now use the style controls to modify the object.
Click on another object to select it for modifications or right-click to unselect all objects.
Click the Copy object button. The program goes to "select object to copy" mode.
Move the mouse to the object you want to copy. Selection candidate objects are highlighted in green colour to indicate: A mouse click will not modify any existing object.
Click the object you want to copy. The program goes to "place copy" mode. The copy is attached to the mouse, move the copy to the intended position and click to place the copy.
The program goes back to "select object to copy" mode. You can either select another object to copy or right-click to go back to "no operation" mode.
Click the Move object button. The program goes to "select object to move" mode.
Move the mouse to the object you want to move. Selection candidate objects are highlighted in blue colour to indicate: A mouse click will apply changes to existing objects.
Click the object you want to move. The program goes to "move object" mode. The object is attached to the mouse, move it to the intended position and click to place the object.
The program goes back to "select object to move" mode. You can either select another object to move or right-click to go back to "no operation" mode.
Click the Delete object button. The program goes to "delete" mode.
Move the mouse to the object you want to move. Selection candidate objects are highlighted in red colour to indicate: A mouse click will delete the object.
Click the object(s) to delete.
Right-click to go back to "no operation" mode.
Click the Add point button. The program goes to "select order to add point". Selection candidate objects are highlighted in light blue to indicate: Object will be modified. The neighbour(s) of the new point are highlighted in green to indicate: Something is to be added to the drawing.
Place the mouse near a control point to select the neighbour point(s) and click. The program goes to "place new point" mode.
You can now click to place the new point on the desired position. The program switches back to "select order to add point" mode. You can either add further points or right-click to go back to "no operation" mode.
Click the Delete point button. The program goes to "delete point" mode. Selection candidate objects are highlighted in light blue to indicate: Object will be modified. The candidate point is highlighted in red colour to indicate: On mouse click this point is deleted.
Click on the point(s) you want to delete.
Right-click to go back to "no operation" mode.
You can move control points of any object. For circles moving a control point results in changing the radius. For ellipses moving a control point results in changing radii and rotation. For connection dots, pin dots, and texts moving the control point results in moving the object. For all other objects moving a control point results in a changed shape.
Click the Move point button. The program goes to "select point to move" mode. Selection candidate objects are highlighted in light blue to indicate: Object will be modified. The candidate point is highlighted in blue colour.
Click the point to move. The program goes to "place moved point" mode. Depending on the Point move mode choice the point is immediately moved to the cursor position and follows move movements (snap) or follows the relative position change of the mouse (relative).
Click on the desired position to place the point. The program goes back to "select point to move" mode. So you can either select another point to move or right-click to go back to "no operation" mode.
Click the Modify spline point s value button.
Click the spline point to modify. The "Spline s value" dialog is shown, here you can modify the value.
After finishing the dialog the program is still in "modify s value" mode. So you can either select another spline point to modify or right-click to go back to "no operation" mode.
Click the Flip horizontally or Flip vertically button. The program goes to the "flip object" mode. Selection candidate objects are highlighted in blue.
Click the object(s) you want to flip.
Right-click to go back to "no operation" mode.
Click the Rotate object 90 degree to the left or the Rotate object 90 degree to the right button. The program goes to "rotate object" mode. Selection candidate objects are highlighted in blue.
Click on the object(s) you want to rotate. The control point of the object you clicked is used as pivot point. You can click multiple times to rotate by 180 or 270 degree.
Right-click to go back to "no operation" mode.
When rotating an embedded image, either directly or as part of a group, only the coordinates for image area are rotated, not the image itself.
Click the Object details button. The program goes to "modify object details" mode. Selection candidate objects are highlighted in blue.
Click on the box you want to modify. The "Box options" dialog is shown. Use the slider to modify the corner radius, confirm by clicking the "OK" button. Setting the radius to 0 will make the box rectangular without rounded corner.
When returning from the dialog the program is still in "modify object details" mode. You can either modify further object details or right-click to go back to "no operation" mode.
Click the Object details button. The program goes to "modify object details" mode. Selection candidate objects are highlighted in blue.
Click on the dot you want to modify. The "Dot options" dialog is shown. In the "Diameter" spin control you can specify the dot diameter in multiples of the base line width.
When returning from the dialog the program is still in "modify object details" mode. You can either modify further object details or right-click to go back to "no operation" mode.
Click the Object details button. The program goes to "modify object details" mode. Selection candidate objects are highlighted in blue.
Click on the dot you want to modify. The "Dot options" dialog is shown. In the "Diameter" spin control you can specify the dot diameter in multiples of the base line width. In the "Line width" spin control you can specify the line width in multiples of the base line width.
When returning from the dialog the program is still in "modify object details" mode. You can either modify further object details or right-click to go back to "no operation" mode.
Click the Object details button. The program goes to "modify object details" mode. Selection candidate objects are highlighted in blue.
Click on the text label you want to modify. The "Text input" dialog is shown. In the "Export text" text field you can modify the text written to LaTeX output. For LaTeX texts you can modify the text shown on screen in the "Screen text" text field.
When returning from the dialog the program is still in "modify object details" mode. You can either modify further object details or right-click to go back to "no operation" mode.
Click the Object details button. The program goes to "modify object details" mode. Selection candidate objects are highlighted in blue.
Click on the image to modify. A file chooser dialog "Choose image" is shown. Here you can select another image file.
Next the "Image options" dialog is shown. Image options are used by the wxd2lat program when converting the drawing to output for LaTeX.
| Option | Purpose |
|---|---|
| RGB to gray | Select the method to convert RGB to gray if gray output is wanted. |
| Keep aspect ratio | You can either keep the aspect ratio, probably leaving some parts of the image area unused or use the full image area showing the image probably distorted. |
| Use alpha channel | An alpha channel can be used or ignored if present. Using the alpha channel means mixing foreground data against a background using alpha channel data as opacity. Ignoring the alpha channel results in just using the foreground pixel data. |
| DCT data | DCT encoded data from JPEG files can be re-used directly when producing PDF or EPS output. This results in shorter conversion time and smaller output than uncompressing the image and recompressing it to flate or LZW compression. Note: Re-using DCT data means embedding the entire JPEG file into output including EXIF data like locations, timestamps... |
| Image interpolation | Set image interpolation flag. This flag allows rendering programs to attempt to optimize the image representation. |
| Image interpolation for DCT data | For DCT compressed data the interpolation flag should not be necessary as DCT compression and decompression already results in some smoothing. |
| Enforce background | An image file can contain both an alpha channel and a background chunk containing the background colour. Here we have to choose whether to use the background chunk data or the fill colour specified in the drawing. |
When returning from the dialog the program is still in "modify object details" mode. You can either modify further object details or right-click to go back to "no operation" mode.
Click the Group objects, select one by one button. The program goes to "group single objects" mode.
Click all the objects you want to add to the group. Group member candidates are highlighted in black. If you accidently clicked a wrong object, click it again to remove it from the selection list.
Click into some empty space in the drawing (no candidate highlighted). This indicates: Element selection finished, create group.
The program remains in "group single objects" mode. So you can either click other elements to build yet another group or right-click to go back to "no operation" mode.
Click the Group objects, select by region button. The program goes to "group region, first point" mode.
Click one corner point of the rectangular region containing the objects to group. The program goes to "group region, second point" mode.
Click the opposite corner of the region. The group is finished, the program goes back to "group region, first point" mode. You can either start a new group or right-click to go back to "no operation" mode.
Click the Resolve group button. The program goes to "resolve group" mode.
Click the groups you want to resolve/ungroup.
Right-click to go back to "no operation" mode.
Before creating objects you probably want to use the style controls to set up default style values for the new objects.
Click the Polyline button. The program goes to "add first polyline point" mode.
Click on the start position of the line. The program goes to "add further polyline point" mode.
Click on the further points of the polyline, including the final point.
Right-click to indicate the line or polyline was finished. The program goes back to "add first polyline point" mode. You can either click to start another polyline input or right-click once more to go back to "no operation" mode.
Click the Polygon button. The program goes to "add first polygon point" mode.
Click on the first polygon point. The program goes to "add further polygon point" mode.
Click on the further points of the polygon, including the final point.
Right-click to indicate the polygon was finished. The program goes back to "add first polygon point" mode. You can either click to start another polygon input or right-click once more to go back to "no operation" mode.
Click the Rectangular box button. The program goes to "add first box point" mode.
Click on one intended corner point of the box. The program goes to "add second box point" mode.
Click on the opposite corner point. The box is finished, the program goes back to "add first box point" mode. You can either click to start the next box input or right-click to go back to "no operation" mode.
Click the Rounded box button. The program goes to "add first box point" mode.
Click on one intended corner point of the box. The program goes to "add second box point" mode.
Click on the opposite corner point. The box is finished, the program automatically selects a corner radius, one quarter of the smaller side length.
The program goes back to "add first box point" mode. You can either click to start the next box input or right-click to go back to "no operation" mode.
Click the Circle button. The program goes to "circle center" mode.
Click on the intended center point of the circle. The program goes to "circle radius" mode.
Click on any point of your intended circle. The circle is finished, the program goes back to "circle center" mode. You can either click the next center point to add a further circle or right-click to go back to "no operation" mode.
Click the Ellipse button. The program goes to "ellipse center" mode.
Click on the intended center point of the ellipse. The program goes to "ellipse radii" mode.
Clock on one corner point of the ellipses bounding box to specify both radii at once. The ellipse is finished, the program goes back to "ellipse center" mode. You can either click the next center point to add a further ellipse or right-click to go back to "no operation" mode.
Click the Open arc button. The program goes to "first arc point" mode.
Click on the arcs start point. The program goes to "second arc point" mode.
Click on a point the circular arc traverses. The program goes to "third arc point" mode.
Click on the final point. The arc is finished, the program goes back to "first arc point" mode. You can either click the start point of a further arc or right-click to go back to "no operation" mode.
Same procedure as for open arc, but use the Closed arc button.
Use the Open approximated splin or Open interpolated spline" button. The program goes to "first spline point" mode.
Click on the first control point. The program goes to "further spline point" mode.
Click on the remaining spline points, including the final one.
Right-click to indicate the spline is finished. The program goes back to "first spline point" mode. You can either click to start adding a further spline or right-click to go back to "no operation" mode.
Use the Closed approximated splin or Closed interpolated spline" button. The program goes to "first spline point" mode.
Click on the first control point. The program goes to "further spline point" mode.
Click on the remaining spline points, including the final one.
Right-click to indicate the spline is finished. The program goes back to "first spline point" mode. You can either click to start adding a further spline or right-click to go back to "no operation" mode.
Before creating a dot you probably want to use the "Options → New objects" menu item to set the default dot diameter.
Click the Connection dot button. The program goes to "add dot" mode.
Click on all desired dot positions.
Right-click to go back to "no operation" mode.
Click the Pin dot button. The program goes to "add dot" mode.
Click on all desired dot positions.
Right-click to go back to "no operation" mode.
Click the Text label button. The program goes to "add text" mode.
Click on the anchor point for the text label. The "Text input" dialog is shown. In the "Export text" text field enter the text written to LaTeX output. For LaTeX texts you can enter a different text shown on screen in the "Screen text" text field.
After closing the dialog the program goes back to "add text" mode. So you can either click an anchor point position to add a further text or right-click to go back to "no operation" mode.
Click the Image button. The program goes to "first image point" mode.
Click one corner point of the image area. The program goes to "second image point" mode.
Click the opposite corner of the image area. The file chooser dialog "Choose image" is shown. Choose the image file.
The program goes back to "first image point" mode. You can either click another corner point to insert a further image or right-click to go back to "no operation" mode.
Click the Library element button. The file chooser dialog "Choose library element" is shown. Choose the *.wxd file you want to use as library element. The program goes to "place library element" mode.
Use the mouse to move the library element to the desired position and click to place the element.
While initially placing the symbol you can use the "r" key to rotate the symbol counterclockwise. Use the "v" and "h" keys to flip the symbol vertically or horizontally. These keys are only available when placing a symbol initially. They are not available in later placements, i.e. in copy or move operations.
The file chooser dialog is shown again. You can either choose a file to place yet another library element or cancel the dialog to go back to "no operation" mode.
When opened the first time, the file chooser dialog is in the wxdkdraw library root directory. Here you can find one ore more subdirectories "IN-4", "IN-5", "CM-4" or "CM-5". The directory names correspond to grid settings (inch/cm, 4/5 magnetic grid steps per optical grid step).
I recommend to only import library elements with grid settings equal to current drawing.
The colours used for border, drawing background, grid, placement help, highlighting objects, and highlighting missing image file can be changed.
For colour filled dots and white filled dots you can specify a default diameter to use when creating new dots. The diameter is specified in integer multiples of the base line width.
Exact fonts
By default text labels are shown in a font similar to the font configured for the label. A font matching the combination of roman/sans-serif/typewriter, normal/bold, and upright/italic is used.
The "Exact fonts" option searches for a better matching font but uses the similar font as fallback if no better font is found.
The recommended value for this option is: off.
Bezier segments per X-spline sub-segment
X-splines use 5th degree functions, Bezier splines use 3rd degree functions. As our file format uses X-splines but screen drawing operations are available for Bezier splines, we use multiple Bezier segments to draw each X-spline segment.
You can modify the number of Bezier splines used to draw an X-spline segment in the range 2 to 32, the recommended value is 4.
Reduce markup size
For operations on an entire object the objects control points are marked by squares larger than the line width. So you can easily identify a selection candidate even if the object colour is the same as the highlighting colour.
For operations on one control point of an object we need to identify one unique point even if the line is wide and the control points are close to each other. So small squares are used to highlight control points.
The recommended value for this option is: on.
This menu item resets all options and the style defaults to the programs default values.
Drawings in wxdkdraw are not bound to paper sizes, you can choose any drawing size you want. The drawing size configured in wxdkdraw is used as bounding box for (E)PS output or crop box for PDF output.
The coordinates used in wxdkdraw allow drawing sizes up to 264 inches (670 centimeters). If you want to use non-negative coordinates only, the drawing size is limited to 132 inches (335 centimeters).
You can change the drawing size as often as needed.
I prefer to set the drawing size finally when everything is drawn. So I can set the drawing size to include all graphic elements and a little space at all borders.
To produce an icon file for a program I recommend a 1 inch × 1 inch square.
To produce an XPM file for a toolbar button I recommend a rectangle 1 inch wide, 15/16 inches high.
For LaTeX text labels the text is transferred to LaTeX output "as is". When producing an object no font or text size information is written to LaTeX output. When the object is used in a TeX document, text labels in the illustration use the same font and size as the document text.
For non-LaTeX text labels all characters not allowed as text in LaTeX (i.e. percent sign, underscore, german umlauts...) are replaced by appropriate LaTeX commands.
When producing an object a font with similar features is selected, the size is used as configured in the text label.
When producing a document, the exact font and size is used as configured in the text label.
The translation of illegal characters to LaTeX commands is table based, files *.t2l in the /usr/share/dktools/charmap directory assign LaTeX commands to Unicode characters. At this time there is only support for some European languages.
For LaTeX text labels you can enter two texts.
The "Export text" is the text written to LaTeX output by the wxd2lat program.
The "Screen text" is the text shown on screen by wxdkdraw.
If the export text contains longer instructions like "\(R_{\text{C}}\)" the text may overlap other graphic elements on screen. So for better overview it is better to specify a shorter screen text "RC".
The wxd2lat program converts wxdkdraw drawings to formats for use with LaTeX. You can either produce objects or documents.
An object is a file or file pair you can use in a LaTeX document as illustration for your text.
A document is a file or file pair you can directly process using pdflatex resulting in a PDF file.
See Graphics conversion hints for suggestions.
No, it isn't. There are no plans to add it.
Please use the wxd2lat program to convert wxdkdraw drawing into formats for use with LaTeX.
Internal representation of drawing data differs between wxdkdraw and wxd2lat.
In wxdkdraw the graphic objects are sorted by layer number only, in wxd2lat the sort order also includes style attributes. The purpose is to produce smaller output file by bundling similar objects, so less "set line width", "set line colour" ... instructions are needed.
In wxdkdraw the coordinates use integer values, in export we have to use floating point numbers.
| ← Previous | ↑ Home | ↑ Programs | → Next |
Wiki: wxd2lat
Wiki: wxdkdraw
gxhints - Graphics conversion hints: Wiki: Home