// JLH = James Hammons <jlhamm@acm.org>
//
// WHO WHEN WHAT
-// --- ---------- ------------------------------------------------------------
+// --- ---------- -----------------------------------------------------------
// JLH 09/20/2011 Created this file
//
float yOffset = -12.0 * Global::zoom * size;
// Fix text so it isn't upside down...
+#if 0
if ((angle > PI * 0.5) && (angle < PI * 1.5))
{
angle += PI;
yOffset = 12.0 * Global::zoom * size;
}
+#else
+ if ((angle > QTR_TAU) && (angle < THREE_QTR_TAU))
+ {
+ angle += HALF_TAU;
+ yOffset = 12.0 * Global::zoom * size;
+ }
+#endif
textBox.translate(0, yOffset);
painter->save();
// Since we're drawing directly on the screen, the Y is inverted. So we use
// the mirror of the angle.
+#if 0
double orthoAngle = -angle + (PI / 2.0);
+#else
+ double orthoAngle = -angle + QTR_TAU;
+#endif
Vector orthogonal = Vector(cos(orthoAngle), sin(orthoAngle));
Vector unit = Vector(cos(-angle), sin(-angle));
// Since we're drawing directly on the screen, the Y is inverted. So we use
// the mirror of the angle.
+#if 0
double orthoAngle = -angle + (PI / 2.0);
+#else
+ double orthoAngle = -angle + QTR_TAU;
+#endif
Vector orthogonal = Vector(cos(orthoAngle), sin(orthoAngle));
Vector unit = Vector(cos(-angle), sin(-angle));
// We draw the arrowhead aligned along the line from tail to head
double angle = Vector(head - tail).Angle();
+#if 0
double orthoAngle = angle + (PI / 2.0);
+#else
+ double orthoAngle = angle + QTR_TAU;
+#endif
Vector orthogonal = Vector(cos(orthoAngle), sin(orthoAngle));
Vector unit = Vector(head - tail).Unit();