explicit names
This commit is contained in:
@@ -12,9 +12,9 @@ struct Anchor {
|
||||
float scale = 0.0f;
|
||||
int segment = -1;
|
||||
|
||||
Anchor(float x, float y, float angle, float scale)
|
||||
explicit Anchor(float x, float y, float angle, float scale)
|
||||
: x(x), y(y), angle(angle), scale(scale) {}
|
||||
Anchor(float x, float y, float angle, float scale, int segment)
|
||||
explicit Anchor(float x, float y, float angle, float scale, int segment)
|
||||
: x(x), y(y), angle(angle), scale(scale), segment(segment) {}
|
||||
};
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@ struct PlacementBox {
|
||||
float padding = 0.0f;
|
||||
};
|
||||
|
||||
struct Placement {
|
||||
explicit Placement() {}
|
||||
explicit Placement(float zoom, const PlacementRange &rotationRange)
|
||||
struct PlacementProperty {
|
||||
explicit PlacementProperty() {}
|
||||
explicit PlacementProperty(float zoom, const PlacementRange &rotationRange)
|
||||
: zoom(zoom), rotationRange(rotationRange) {}
|
||||
|
||||
float zoom = -1.0f;
|
||||
@@ -59,9 +59,10 @@ class Collision {
|
||||
public:
|
||||
Collision();
|
||||
|
||||
Placement place(const GlyphBoxes &boxes, const CollisionAnchor &anchor,
|
||||
float minPlacementScale, float maxPlacementScale,
|
||||
float padding, bool horizontal);
|
||||
PlacementProperty place(const GlyphBoxes &boxes,
|
||||
const CollisionAnchor &anchor,
|
||||
float minPlacementScale, float maxPlacementScale,
|
||||
float padding, bool horizontal);
|
||||
float getPlacementScale(const GlyphBoxes &glyphs, float minPlacementScale,
|
||||
float maxPlacementScale, float pad);
|
||||
PlacementRange getPlacementRange(const GlyphBoxes &glyphs,
|
||||
|
||||
Reference in New Issue
Block a user