This article demonstrates a graphic editor introduced by FastReport.Net and seeks to offer strategies how to use some of its new features which differentiate the editor from a well - known graphic editor Point.
Let us take a close look at the object "Shapes” that includes both finished shape and the line from which you can create your own polygons.
The elements “Line” (and its derivatives), “Rectangle”, “Rounded Rectangle”, “Ellipse”, “Triangle” and “Rhombus” are well known. New forms that have been released significantly extended the capabilities of the shapes. Developers of FastReport.Net have added the following elements: “Polyline”, “Polygon”, “Pentagon”, “Hexagon”, “Heptagon”, “Octagon”. All these new figures are constructed with the help of polylines, that allow editing of their shape, new angles and lines.
Let us review the element “Polyline”. When you add it to the page it is necessary to specify the starting point from where to build the line. Choose the right place and click on it. Now, you need to specify the second point. The line will be built between the two points. By specifying the third point, you create a line from the second to the third point and so on.
It is possible to build a figure by connecting the last point in the first one.
Now let us examine the possibility of editing the shapes of already created figure.
It is possible to:
1. add new point on the line;
2. add a new line to the top;
3. add a new line to the end;
4. delete points;
5. move the points by mouse (thus changing the shape).
In addition, you can stretch, compress and move the shape.
The toolbar for editing polygons and polylines is given bellow:
It is possible to build a figure by connecting the last point in the first one.
Now let us examine the possibility of editing the shapes of already created figure.
It is possible to:
1. add new point on the line;
2. add a new line to the top;
3. add a new line to the end;
4. delete points;
5. move the points by mouse (thus changing the shape).
In addition, you can stretch, compress and move the shape.
The toolbar for editing polygons and polylines is given bellow:
It must be mentioned, that this panel is available only in FastReport.Net classic interface. It means that it is unavailable in the Ribbon interface-it. To switch to the old interface, use the menu “View-> Settings-> Interface”, uncheck the checkbox "Use the new Ribbon-interface."
To enable a shape edit mode, click on it by right mouse button and select "Edit" from the context menu. In this case there will a loss of a frame around the figure take place and figures editing toolbar will become active.
1. To add new points in the shape, use the item
Now you can drag the added nodes to change the shape using the mouse.
In the image given above two new points were added to the shape.
2. The function
Three points were added to the pentagon in the image above. First, a line to the start was added to get the point 6. It was connected to points 1 and 5. Then another line was added to the start to the point 7. It was connected to points 1 and 6. Finally, one more line was added to the start to get the point 8, connected with points 1 and 7.
3. The function
In the picture given above a line was added to the end to get a point 6. It was connected to points 1 and 5. Next, another line was added to the end to get the point 7. It was connected to points 1 and 6. In the end, one more line was added to the start to get the point 8, connected to points 1 and 7.
This study illustrates that the procedure in paragraph 2 is identical to the procedure in paragraph 3 with the only difference in last point 5 of the pentagon that became the starting point for each added segment.
4. Removal mode of nodal points is activated by the icon
The picture given above shows a remote point for the figure from the first example.
5. It is possible to move the point of the figure in a polygon editing mode. You should drag the desired point to the desired location. At the same time associated with the point line will be redrawn according to the new location. All the above discussed operations are relevant for working with Polyline.
Let us analyze the object “Polygon”
Shapes “Pentagon”, “Hexagon”, “Heptagon” and “Octagon” are the prepared forms, which can be edited (resize, add new point).
To fill the color, use the feature “Fill”. You will see the following screen:
The example illustrates that the shape of a figure can be filled not only with a solid color, but with a linear gradient, a path gradient (ellipse or rectangle) or a shading and glass (a translucent filling).
We have exhibited the new features of "drawing" in FastReport.Net which are worth having.