Tutorial: Arrows in FireMonkey (Delphi DX 11.1 Alexandria)

Опубликовано: 10 Апрель 2026
на канале: Quark Cube
1,348
46

DISCLAIMER: This video is boring to the average YouTube viewer.


We build a line from two points. We can create a vector with the two points. The vector has a direction and a magnitude. With this we create arrows. The arrows indicate their length. With a switch we can erase everything. With a TrackBar we change the scaling of the lengths of all arrows. This could be used for the resolution of an image so that the scaling of the lengths fits.


Pfeile in FireMonkey (Delphi DX 11.1 Alexandria)

Wir bauen eine Linie aus zwei Punkten. Wir können mit den beiden Punkten einen Vektor erstellen. Der Vektor hat eine Richtung und einen Betrag. Damit erstellen wir Pfeile. Die Pfeile geben ihre Länge an. Mit einem Schalter können wir alles löschen. Mit einer TrackBar ändern wir die Skalierung der Längen aller Pfeile. Dies könnte für die Auflösung eines Bildes verwendet werden, damit die Skalierung der Längen passt.

0:00 Overview
2:56 Start Delphi and go
3:21 Save the project
3:51 Switch to Windows 64
4:01 Put a ToolBar on top of the shape
4:18 We need a view - TLayout - with HitTest
4:45 A FireMonkey frame for the arrows
6:11 Insert a frame into the project with no traces
7:18 Create a layout with properties (MouseDown, MouseMove).
7:50 Set the basics of the arrows in the frame
10:17 How the properties of the layout (MouseDown, MouseMove) should react
14:19 Draw a line in the frame
15:34 Show text aligned to the line
23:29 Draw arrows
24:09 Short symbolic calculation overview
28:47 Structure variables
29:05 Show start arrow in green
30:46 Show end arrow in red
32:10 Check line status, text white or yellow
32:45 The reset button on the form
34:21 Basic shot of the shape
34:34 We test the arrows
35:09 We simulate scaling with a trackbar
36:14 Creating a property to tell the current scale
43:41 Why the frame shouldn't have a hit test
44:11 Frame HitTest False
44:47 We test
48:35 Set the caption of the application
49:05 We continue testing
51:55 We take out the lines and all we see are arrows
52:44 Set the opacity of the line to 0.5
54:07 Set the Opacity line back to 1
54:31 Include FMX.Utils for PointToString if necessary
58:01 Where the rounded corners of the text come from
58:55 Why scaling can be a problem in the frame
1:00:05 Check scale in frame
1:00:49 Where the rounded corners in the text come from
1:02:06 End of testing
1:04:05 Where the app is to start

#FireMonkey #Delphi