| Contents | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Previous | Next |
| 19. Pulldown-menu Drawings |
|
A Vector graphic contains Objects in form of a description of all the lines, curves, and other shapes. As the appearance of objects in a Vector is based upon the output device, you get a much higher degree of detail.
One of the most common misunderstandings is the difference between Vector or Drawing and Bitmap also known as Raster Graphics.
Drawing programs create Vector graphics, made of lines and curves defined by mathematical objects called Vectors. Vectors describe graphics according to their geometric characteristics.
For example, a bicycle tire in a Vector graphic is made up of a mathematical definition of a circle drawn with a certain radius, set at a specific location, and filled with a specific colour. You can easily move, resize, or change the colour of the tire without losing the quality of the graphic.
A Vector graphic is resolution-independent, that is, it can be scaled to any size and printed on any output device at any resolution without losing its detail or clarity. As a result, Vector graphics are the best choice for type and bold graphics that must retain crisp lines when scaled to various sizes for example logos.
Bitmap graphics are the most common graphic format in use on the web and, indeed, on the computer. Every single graphic seen on the web is a Bitmap.
Bitmap graphics are composed of pixels, each of which contains specific colour information. A pixel is minutely small; a single image may be composed of hundreds of thousands of individual pixels. Much like cells revealed from a piece of tissue when seen under a microscope, these pixels are only clearly and individually visible when the image is magnified.
A graphic composed entirely of pixels each with its own colour properties is ideal for photographic images where there are thousands, even millions of different colours. Complex fills, shading and gradient effects can easily be rendered. The Bitmap image offers as much freedom as an empty canvas.
In Bitmap graphics, there is an immutable connection between pixels and the image they compose. When a Bitmap graphic is saved, the computer is really saving an exact visual picture of the image: this pixel goes here and is this colour; this pixel goes there and is that colour, and so on and so on.
This connection is responsible for the effects seen when resizing a bitmap graphic. Given three image sizes - an original, one smaller, and one larger - each will naturally contain a different number of pixels. Pixels do not change sizes, but the image has. It takes more pixels to fill the volume of a larger space, fewer to fit into a smaller space.
If we consider Bitmap graphics as being stored in a literal fashion, then Vector Graphics, stored representatively, are their opposites.
Rather than being composed of pixels, Vector graphics consist of points, lines, and curves which, when combined, can form complex objects. These objects can be filled with solid colours, gradients, and even patterns.
Vector graphics are mathematical creations. For this reason, the programs that are used to create them save instructions on how the image should be drawn, rather than how it looks. This is the key difference between the two types of graphics. Because the computer has a description of how the image should look, it can be redrawn at any size, in any position, without losing any quality. A Vector graphic resized to 5 times its original dimensions is simply reproduced, exactly, at the new size. It can also be freely manipulated without losing coherence, like a rubber band that can be stretched an infinite number of ways.
The price of this scaling flexibility is that Vector images must remain relatively simple in comparison to Bitmap images. It is impossible to render the nuances of a photographic image in a Vector editor; as a result, illustrative Vector graphics have a distinct look and feel, even when produced in detail.
SimplexNumerica’s special rectangle drawing tool is capable to integrate bitmaps in Vector graphic.
SimplexNumerica can load the following bitmap file formats in the rectangle tool:
|
| Drawing Tools | Top |
|
The selection tool is the dotted rectangle and not on the toolbar because it is always available when a drawing tool is finished. You can click in the screen and drag out a rectangle that becomes the current selection. The selection can be cut or copied to the clipboard from the Edit menu.
To paste the current clipboard contents into the screen, left-click in the square you want to paste to in the screen, then select Paste from the Edit menu. Or, you can right-click in the square and choose Paste from the popup menu that appears.
The line tool lets you draw objects in a straight line. To use the tool, left-click in the screen and hold the mouse button down. Then drag the mouse around (with the left button up) to create a line that shows you where the line will be drawn. When you've chosen a line that you like, click again the mouse button to draw the objects.
There are two tools for drawing rectangles of objects. One of them draws a filled rectangle, and the other draws a rectangle outline. They work like the line tool - you click and let go of to select the upper-left corner of the rectangle, drag to create a rubberband that shows the bounds of the rectangle, and click again the left mouse button to draw the rectangle.
The fill tool allows you to fill an area with the currently selected pattern style.
Fills selected object with a choice of pattern. There are many types of fill patterns available to enhance your drawings. Thickness, style and end cap of lines can also be specified.
Offers line type and thickness selection. The line styles option allows you to change the look of your lines around objects. By making lines thicker or thinner you can drastically change the appearance of your objects.
Brings selected object to the front of all other objects on the screen
Places the selected object behind others on the screen
You can group objects within the same activating rectangle so that they can be manipulated as a single item.
You can un-group objects within the same activating rectangle so that they can be manipulated as a single item.
Bitmap files Also known as a "bump" file, it is a Windows and OS/2 bitmapped graphics file format. It is the Windows native bitmap format, and every Windows application has access to the BMP software routines in Windows that support it. BMP files provide formats for 2, 16, 256 or 16 million colours (1-bit, 4-bit, 8-bit and 24-bit colour). BMP files use the .BMP extensions. The right extension for device independent bitmaps is *.dib. But the most programs are using *.bmp for the extension.
|
| Call the Drawings | Top |
|
You can call the drawings in different ways:
· Call from the Pulldown-menu <Edit>, menu option <Drawings>. · Click on Drawing Icon in the upper Toolbar. · Click on any drawing Icon in the lower Toolbar. · If a drawing is already in the 2D-Window, then double click on it. · Is the drawing window already on the screen, but not on top, and then simply activate it.
You can switch off (not delete!!!) the drawings from the 2D-Window as follows:
Remove the hook in front of the checkbox <Display the Vector Drawings>.
All objects (and also all frameworks in SimplexNumerica) are activated with Control key plus Left Mouse click (Ctrl + Left Mouse). This is fact, because single clicks are activating the (current) graphs on the chart.
To change the patterns of an object use the right mouse button to activate a popup menu with the appropriated options.
Hold down the Control key and select more then one object.
You can switch on and off the chart so that the screen layout is accelerated. Properties of the catch radius.
When the trap is on then the next line object will be drawn next to the catches line.
|
| Save & Load Drawings | Top |
|
If the drawings are saved in the simplex format, then you can load it later again.
|
| Windows Metafile Formats (WMF) | Top |
|
The Windows Metafile (*.WMF) formats is a vector formats that may not contain a raster image in SimplexNumerica.
WMF is the native vector file format for the Microsoft Windows operating environment. WMF files are actually a collection of GDI (Graphics Device Interface) function calls also native to the Windows environment. When a WMF file is "played back" (typically using the Windows PlayMetaFile() function) the graphics is rendered. WMF files are device-independant and have no limit to their size.
Most books on Microsoft Windows programming contain sections on the internals of WMF files. The closest thing Microsoft has for a specification for the WMF format is in Volume 4 of the Microsoft Windows Software Development Kit Programmer's Reference. Chapter 3 details the internals of the Metafile Format.
The Microsoft Knowledge Base (available at ftp://ftp.microsoft.com/kb/ and on the Microsoft Developer Network CD) also contains the complete specification of WMF.
SimplexNumerica used the placeable metafile format that was created by Aldus Corp. to allow the positioning of a Windows metafile on a printed page. These metafiles have a 22-byte header then must be stripped before they can be used by the Windows API. Have a look at the following Microsoft Knowledge Base article:
http://www.microsoft.com/Softlib/MSLFILES/METAFILE.EXE This archive contains the METAFILE.HLP help file that describes the WMF file format.
http://www.microsoft.com/Softlib/MSLFILES/PLAYMETA.EXE This archive contains sample Windows code to manipulate WMF files.
http://www.microsoft.com/developr/MSDN/OctCD/METAFI.ZIP This archive contains the METAFI.HLP help file that describes the WMF file format.
Also have a look at:
http://www.r2m.com/windev/ Internet Resources for Windows Developers
|
| Contents | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Previous | Next |
| Copyright © 1988-2006 Dipl.-Phys.-Ing. Ralf Wirtz
Author: Ralf Wirtz |
Last modified: 3 Mar 2006 15:14 Authored in CALnet |