You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/cxx-qt-lib/src/core/qlinef.rs
+44Lines changed: 44 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,14 @@ mod ffi {
17
17
include!("cxx-qt-lib/qpointf.h");
18
18
typeQPointF = crate::QPointF;
19
19
20
+
/// Returns the angle of the line in degrees.
21
+
fnangle(self:&QLineF) -> f64;
22
+
23
+
/// Returns the angle (in degrees) from this line to the given line, taking the direction of the lines into account.
24
+
/// If the lines do not intersect within their range, it is the intersection point of the extended lines that serves as origin (see QLineF::UnboundedIntersection).
25
+
#[rust_name = "angle_to"]
26
+
fnangleTo(self:&QLineF,line:&QLineF) -> f64;
27
+
20
28
/// Returns the line's start point.
21
29
fnp1(self:&QLineF) -> QPointF;
22
30
@@ -48,6 +56,26 @@ mod ffi {
48
56
#[rust_name = "is_null"]
49
57
fnisNull(self:&QLineF) -> bool;
50
58
59
+
/// Returns the length of the line.
60
+
fnlength(self:&QLineF) -> f64;
61
+
62
+
/// Returns a line that is perpendicular to this line with the same starting point and length.
63
+
#[rust_name = "normal_vector"]
64
+
fnnormalVector(self:&QLineF) -> QLineF;
65
+
66
+
/// Returns the point at the parameterized position specified by t. The function returns the line's start point if t = 0, and its end point if t = 1.
67
+
#[rust_name = "point_at"]
68
+
fnpointAt(self:&QLineF,t:f64) -> QPointF;
69
+
70
+
/// Sets the angle of the line to the given angle (in degrees). This will change the position of the second point of the line such that the line has the given angle.
71
+
#[rust_name = "set_angle"]
72
+
fnsetAngle(self:&mutQLineF,angle:f64);
73
+
74
+
/// Sets the length of the line to the given length. QLineF will move the end point - p2() - of the line to give the line its new length, unless length() was previously zero, i
75
+
/// in which case no scaling is attempted. For lines with very short lengths (represented by denormal floating-point values), results may be imprecise.
0 commit comments