Drawing Components
Components are objects that are placed on the canvas and manipulated by the user. A component can be a simple shape (for example, a drawing primitive) or a complex collection of shapes or images. Objective Views provides the user interface functionality needed to draw shapes and add them as components onto a canvas. To start drawing a component, the user selects the toolbar button or menu command that corresponds to a particular shape. This puts the Objective Views application into a mode that enables it to accept further input to draw the component. The left mouse button is used to draw the shape, while the right mouse button cancels the draw command. The following table describes how to draw each type of shape or primitive component and perform other drawing related tasks.
Drawing Shapes
|
To |
Do this |
|
Draw a component of equal proportions or at 90 degree angles |
Hold the SHIFT key while drawing a component. For example, if the user selected a rectangle tool button and then clicked in the client area while holding the SHIFT key, the application would draw a square. |
|
Draw a component that is centered on the point at which the drawing started. |
Hold the CTRL key while drawing a component. |
|
|
Click the Line button |
|
Draw a polyline
|
Click the Polyline button |
|
Draw a rectangle
|
Click the Rectangle button |
|
Draw a polygon
|
Click the Polygon button |
|
Draw a polycurve
|
Click the Polycurve button |
|
|
Click the Closed Curve button |
|
Draw an ellipse
|
Click the Ellipse button |
|
Add text |
Click the Text button |
|
Add an image |
Click the Image button |
. Then, click and hold the mouse button in the client area and drag until the line is the appropriate length.
. Then, click in the client area. Click again to place a vertex. Double-click to finish drawing. Right-click to cancel the action.
. Then, click and hold the mouse button in the client area. Drag the pointer until the rectangle is the width and length you want.
. Then, click in the client area. Click again to place a vertex. Double-click to finish drawing. Click the right mouse button to cancel the action.
. Then, click in the client area. Click to place an endpoint, two control points and another endpoint. Double-click to finish drawing or right-click to cancel.
. Then, click in the client area. Click to place an endpoint, two control points and another endpoint. Double-click to finish drawing or right-click to cancel. Unlike the polycurve, the user can assign a fill color to a closed curve.
. Then, click and hold the mouse button while dragging in the client area until the ellipse is the size you want.
. Then, click in the client area. The text can be changed by double-clicking on the text component.
to open a standard Open dialog from which the user can select an image in either .bmp, .png or .dib format.