src/miscallenous.h

changeset 1023
9450ac3cd930
parent 1014
f0a8ecb6a357
child 1024
67ba0ee049eb
equal deleted inserted replaced
1022:a7f8ce5aa858 1023:9450ac3cd930
35 WorldOrigin, 35 WorldOrigin,
36 CustomPoint, 36 CustomPoint,
37 NumValues 37 NumValues
38 }; 38 };
39 39
40 namespace Grid
41 {
42 enum Type
43 {
44 Coarse,
45 Medium,
46 Fine
47 };
48
49 enum Config
50 {
51 Coordinate,
52 Angle
53 };
54 }
55
56 void applyToMatrix (Matrix& a, ApplyToMatrixFunction func); 40 void applyToMatrix (Matrix& a, ApplyToMatrixFunction func);
57 void applyToMatrix (const Matrix& a, ApplyToMatrixConstFunction func); 41 void applyToMatrix (const Matrix& a, ApplyToMatrixConstFunction func);
58 void configureRotationPoint(); 42 void configureRotationPoint();
59 QString formatFileSize (qint64 size); 43 QString formatFileSize (qint64 size);
60 int gcd (int a, int b); 44 int gcd (int a, int b);
61 Vertex getRotationPoint (const LDObjectList& objs); 45 Vertex getRotationPoint (const LDObjectList& objs);
62 float gridAngleSnap();
63 float gridBezierCurveSegments();
64 float gridCoordinateSnap();
65 QString joinStrings (QList<StringFormatArg> vals, QString delim = " "); 46 QString joinStrings (QList<StringFormatArg> vals, QString delim = " ");
66 void roundToDecimals (double& a, int decimals); 47 void roundToDecimals (double& a, int decimals);
67 void simplify (int& numer, int& denom); 48 void simplify (int& numer, int& denom);
68 double snapToGrid (double value, const Grid::Config type);

mercurial