Triangle- Draws a triangle
Draws a triangle in the graph.
- (int) X1: horizontal coordinate of the first vertex;
- (int) Y1: vertical coordinate of the first vertex;
- (int) X2: horizontal coordinate of the second vertex;
- (int) Y2: vertical coordinate of the second vertex;
- (int) X3: horizontal coordinate of the third vertex;
- (int) Y3: vertical coordinate of the third vertex;
- (int) R: rotation expressed in degrees (optional).
Use Triangle to draw a triangle. The triangle is defined by the points X1 Y1 (first vertex), X2 Y2 (second vertex) and X3 Y3 (third vertex).
The perimeter of the triangle is drawn using the current pen and color (Pen, ColorPen), while the surface is filled with the current brush or color (Brush, ColorBrush).
Optional parameter R defines the rotation of the triangle around its center or around a origin point defined with the GraphicOrigin instruction. The value is expressed in degrees. If omitted the rotation is 0 degrees.
Drawing with the mouse:
From the drawing context menu choose Triangle. Move your pointer over the first vertex of the triangle and press the left button to fix it. Move the pointer to the second vertex - a line is drawn from the first vertex to the mouse pointer - and press the left button. Move the pointer until the third vertex is established - a triangle is drawn that goes from the two vertices fixed to the pointer - and press the left button.
Once the coordinates of the triangle are defined, you use the mouse wheel to rotate it around its hypothetical center or around a point of origin defined with the GraphicOrigin instruction. When using the mouse wheel with the Ctrl key, the triangle is enlarged or reduced. To insert the Triangle instruction into the graph, confirm with the left mouse button.