<< Click to Display Table of Contents >> Navigation: The graphical user interface > Main Window > Tools menu > Vector graphics |
From version 5 ATPDraw supported vector graphics icons. The advantages with this are
•larger icons possible (255x255 pixels compared to 41x41 for bitmaps).
•layers can more easily be turned on/off programmatically so that the icon appearance can reflect user selections
•a larger icon size enables more nodes
•better flipping (left-to-right) of the icon (the text is not flipped)
•individually scalable icons
•far better zooming capabilities
The user can use both icon formats, and this is selected under support file editing. ATPDraw can convert vector graphics to bitmap but not the other way.
A vector graphic icon can consist of up to 93 Elements within a frame of up to 255x255 pixels. Each Element has a Visible property and a Layer number used to identify various layers of the icon. An element can be either a Shape or a Text. A Shape is described by up to 255 coordinate points (-127..128, -127..128) of the following types: line, rectangle, ellipse, polyline, polygon, arc, bezier curves, and pie. And in addition the pen (border) and brush (fill) color and style as well as the pen width. A Text can be up to eight characters wide and it is described by a position (-127..128,-127..128) of the text center, a font code, the font size, color, and style together with the rotation flag. The vector graphic icon also contains an enclosing rectangle described by top, left, bottom, right used for selection of the icon and a point ExtP where the branch output request symbols are added. In the provisional icon "editor" the relative node positions can also be edited. Only values rounded to the nearest 10 are allowed.
For backward compatibility reasons all icons have maintained their previous sizes and node positions. Each icon is however individually scalable (in addition to the common zooming). To scale an icon select a vector graphic icon and move the mouse cursor on the icon border. When the mouse cursor changes to a double arrow press the left mouse key and drag the icon. Only an integer number of zoom factors are supported in order to maintain the node positions on the grid points (10 pixels).
ATPDraw version from 5.4 offers a vector graphic editor
See also the more details on
Select individual elements by clicking on the desired element in the icon window or by scrolling through the elements in the Edit element combo box. Specify the element properties in the grids below. Shortcuts for color selection is to click the standard color palette to the far right. Left click for pen color (border) and right click for brush color (fill). More colors can also be given in the properties grid. To draw a shape without a fill (applies to rectangle, ellipse, polygon, bezier, and pie) the brush style must be set to clear. Zooming is possible via the Edit menu. When the white icon window fills the entire space the zoom factor is 200 %. Select several elements by holding down the Shift key or by dragging a rectangle around the elements.
From the Edit menu the user can export/import the icon to a text file format, and most important copy/paste a group of elements to the windows clipboard. The metafile graphics can also be copied to the clipboard for display in other programs.
New elements are added to icon in various modes selected under Tools. Simply click the icon window to place the points (left mouse button to place a point, right button to place the final point). Remember that arcs and pies require four points. Points can be added or removed in Edit points mode by right clicking near the desired location an select Add/Delete point in the popup menu. Bezier curves consists of control points in addition to the curve points. When placing a Bezier shape only the curve points are added, and the control point calculated internally. In Edit points mode the curve points (point 1-4-7-10 etc.) appear as green while the control points (2-3, 5-6 etc) appear as red with a line to their curve points. When a shape is moved towards the border and some of its points fall outside the limit they instead appear on the opposite side. This is particularly confusing in the case of Bezier curves which consists of invisible control points. A rotated ellipsis (specify a value -90..90 in P3.x) is internally processed as a bezier curve, and near border locations can give unexpected results. When the brush style is set to Clear the user has to click on the border to select the elements. This does not exactly apply to arcs and pies as these respond to mouse clicks on the enclosing ellipsis. It is possible to force squares and circles by holding down the shift key and click on the resize markers for rectangles and ellipses.
In the editor window the user can select and resize elements via the eight marking rectangles. Resizing also works on multiple selected elements. Via the main menu Tool|Edit points the user can also enter a special mode where the individual points (lime color) of the shape can be edited. Fine tuning of the element position is possible by holding down the SHIFT key an use the arrow keys. In order to move the nodes the Nodes checkbox must be checked.
The menu Tool|Move nodes can be selected and the nodes moved between the grid points. The grid is turned on/off in Edit|Node grid.
Rectangles and Ellipses can be rotated -90..90 degrees, by specifying a value in the Points grid of the properties to the right. Rectangles can also be drawn with rounded corners, but not in combination with rotation. All elements (and a group of elements) can also be rotated 90, 180, and 270 degrees and flipped reft to right or top to bottom from the Edit|Flip&Rotate menu.
The elements order can be changed via the four items in Edit|Send to back/front. The element with the lowest number is drawn first. This works also for a group of elements.
The Frame specified in the middle grid consists of a Rectangle characterized by TopLeft and BottomRight and an External point. The rectangle is the selection area which the user has to click inside to select the component in the circuit window and which also encloses the component when it is selected. The External point is used to attach the branch output request indicators.
It is possible to move the entire icons via the Edit|Move all menu item. When the Nodes or Frame checkbox are checked the nodes and frame, respectively are also moved and gridsnap is enforced.
The Show layer combo-box can be used to show individual layers. Elements with a layer number zero are always drawn. The layer information is used internally in ATPDraw to control the appearance of a few standard icons (RLC, Transformers, time controlled switch, etc.).
A standard graphical picture can be added to the icon from the Edit definitions dialog. This picture can be visible in the Vector Graphic Editor via the Pict checkbox and scaleable via the Pict tab.
Note:
•Positioning of text is somewhat unprecise and a problem with alignment seems to exist. +- 1 pixel adjustments are often required. Rotation of texts is possible only by 90, 180, and 270 degrees. A single text can hold only one color and one font, but mixing several different texts is possible.
•Working with arcs, pies and bezier curves very often requires the Edit point mode. For arcs and pies the first and second point control the top-left and bottom-right of the enclosing ellipsis while the third and forth point controls the cutting.
•When converting from a bitmap icon to a vector icon, the vector icon is initially filled with empty elements. To empty the icon you have to go to select Edit|Delete all (Ctrl+A). The frame must also be set to reasonable values. Important: If the frame has no extension it is not possible to select the icon in the circuit.
•The icon does not necessarily have to be placed in the center of the icon window. Nodes at any grid position are accepted.
•When turning on the node names (Nodes checked) the node names are oriented outwards according to the frame. If the frame is set to strange values the node name orientation and position could be awkward. The best result is obtained if the nodes are placed on the frame border.
Things not supported in this version are:
•Undo/Redo (only one step undo of cut/delete)