Adjust angle label margin similarly to eda294ef
.
|
@ -349,8 +349,8 @@ void Constraint::DoArcForAngle(Canvas *canvas, Canvas::hStroke hcs,
|
||||||
double r = max(sqrt(rda*rda + rdna*rdna), 15.0 * pixels);
|
double r = max(sqrt(rda*rda + rdna*rdna), 15.0 * pixels);
|
||||||
|
|
||||||
double th = Style::TextHeight(GetStyle()) / camera.scale;
|
double th = Style::TextHeight(GetStyle()) / camera.scale;
|
||||||
double swidth = VectorFont::Builtin()->GetWidth(th, Label()) + 4*pixels,
|
double swidth = VectorFont::Builtin()->GetWidth(th, Label()) + 8*pixels,
|
||||||
sheight = VectorFont::Builtin()->GetCapHeight(th) + 8*pixels;
|
sheight = VectorFont::Builtin()->GetCapHeight(th) + 6*pixels;
|
||||||
double textR = sqrt(swidth * swidth + sheight * sheight) / 2.0;
|
double textR = sqrt(swidth * swidth + sheight * sheight) / 2.0;
|
||||||
*ref = pi.Plus(rm.WithMagnitude(std::max(rm.Magnitude(), 15 * pixels + textR)));
|
*ref = pi.Plus(rm.WithMagnitude(std::max(rm.Magnitude(), 15 * pixels + textR)));
|
||||||
|
|
||||||
|
@ -412,7 +412,7 @@ void Constraint::DoArcForAngle(Canvas *canvas, Canvas::hStroke hcs,
|
||||||
if(i > 0) {
|
if(i > 0) {
|
||||||
if(trim) {
|
if(trim) {
|
||||||
DoLineTrimmedAgainstBox(canvas, hcs, *ref, prev, p,
|
DoLineTrimmedAgainstBox(canvas, hcs, *ref, prev, p,
|
||||||
/*extend=*/false, gr, gu, swidth, sheight);
|
/*extend=*/false, gr, gu, swidth, sheight + 2*pixels);
|
||||||
} else {
|
} else {
|
||||||
DoLine(canvas, hcs, prev, p);
|
DoLine(canvas, hcs, prev, p);
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |