handle rotation angle sign

This commit is contained in:
artemp 2015-07-09 17:17:09 +02:00
parent d75400b983
commit 1388af9a57

View file

@ -129,7 +129,7 @@ bool placement_finder::find_point_placement(pixel_position const& pos)
{ {
text_layout const& layout = *layout_ptr; text_layout const& layout = *layout_ptr;
rotation const& orientation = layout.orientation(); rotation const& orientation = layout.orientation();
double angle = -asin(orientation.sin); double angle = (orientation.sin > 0 )? -acos(orientation.cos) : acos(orientation.cos);
// Find text origin. // Find text origin.
pixel_position layout_center = pos + layout.displacement(); pixel_position layout_center = pos + layout.displacement();