Warning: session_start(): open(/var/lib/php/sessions/sess_b1r0ff2ocrn7l9b6qpbgapl90t, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
import java.awt.geom.*;
static new ThreadLocal drawOutlineTextAlongLine_flip;
static void drawOutlineTextAlongLine(Graphics2D g, S text, int x1, int y1, int x2, int y2, int shift, Color fillColor, Color outlineColor) {
Bool flip = optPar(drawOutlineTextAlongLine_flip);
if (y2 == y1 && x2 == x1) ++x2;
new AffineTransform tx;
double angle = Math.atan2(y2-y1, x2-x1);
if (flip == null)
flip = abs(angle) > pi()/2;
angle -= pi();
tx.translate((x1+x2)/2.0, (y1+y2)/2.0);
tx.rotate(angle);
AffineTransform old = g.getTransform();
g.setTransform(tx);
FontMetrics fm = g.getFontMetrics();
// int y = shift+fm.getLeading()+fm.getMaxAscent(); // below
int y = -shift-fm.getMaxDescent(); // above
drawTextWithOutline(g, text, -fm.stringWidth(text)/2.0f, y, fillColor, outlineColor);
g.setTransform(old);
}