From 1388af9a57aee0cf628f036e56295846129f70cb Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 9 Jul 2015 17:17:09 +0200 Subject: [PATCH] handle rotation angle sign --- src/text/placement_finder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text/placement_finder.cpp b/src/text/placement_finder.cpp index 6224c8486..33eff9577 100644 --- a/src/text/placement_finder.cpp +++ b/src/text/placement_finder.cpp @@ -129,7 +129,7 @@ bool placement_finder::find_point_placement(pixel_position const& pos) { text_layout const& layout = *layout_ptr; rotation const& orientation = layout.orientation(); - double angle = -asin(orientation.sin); + double angle = (orientation.sin > 0 )? -acos(orientation.cos) : acos(orientation.cos); // Find text origin. pixel_position layout_center = pos + layout.displacement();