change text-max-angle to accept degrees and convert to radians

This commit is contained in:
Eden Halperin
2014-07-26 09:18:42 -07:00
parent 600e1d8a9e
commit 7a8a9fb339
2 changed files with 2 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ public:
float vertical_alignment = 0.5;
vec2<float> translate {0, 0};
TranslateAnchorType translate_anchor = TranslateAnchorType::Default;
float max_angle_delta = M_PI;
float max_angle_delta = 45.0f;
float min_distance = 250.0f;
float rotate = 0.0f; // what is this?
float padding = 2.0f;

View File

@@ -273,7 +273,7 @@ void Placement::addFeature(TextBucket &bucket, const std::vector<Coordinate> &li
GlyphBoxes boxes;
getGlyphs(glyphs, boxes, anchor, info.translate, shaping, face, fontScale, horizontal, line,
info.max_angle_delta, info.rotate);
info.max_angle_delta * (M_PI/180), info.rotate);
PlacementProperty place = collision.place(boxes, anchor, anchor.scale, maxPlacementScale,
info.padding, horizontal, info.always_visible);
if (place) {