mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-12 06:15:32 -04:00
Improved the label text position in the layout shape to match the other components; see #432
This commit is contained in:
parent
3cdf4ff2e3
commit
f3e3927677
@ -145,12 +145,12 @@ public class LayoutShape implements Shape {
|
||||
graphic.drawPolygon(poly, Style.NORMAL.deriveFillStyle(color));
|
||||
graphic.drawPolygon(poly, Style.NORMAL);
|
||||
|
||||
if (top.size() == 0)
|
||||
graphic.drawText(new Vector(width * SIZE / 2, -4), name, Orientation.CENTERBOTTOM, Style.NORMAL);
|
||||
else if (bottom.size() == 0)
|
||||
graphic.drawText(new Vector(width * SIZE / 2, height * SIZE + 4), name, Orientation.CENTERTOP, Style.NORMAL);
|
||||
if (bottom.size() == 0)
|
||||
graphic.drawText(new Vector(width * SIZE / 2, height * SIZE + 4), name, Orientation.CENTERTOP, Style.SHAPE_PIN);
|
||||
else if (top.size() == 0)
|
||||
graphic.drawText(new Vector(width * SIZE / 2, -4), name, Orientation.CENTERBOTTOM, Style.SHAPE_PIN);
|
||||
else
|
||||
graphic.drawText(new Vector(width * SIZE / 2, height * SIZE / 2), name, Orientation.CENTERCENTER, Style.NORMAL);
|
||||
graphic.drawText(new Vector(width * SIZE / 2, height * SIZE / 2), name, Orientation.CENTERCENTER, Style.SHAPE_PIN);
|
||||
|
||||
for (PinPos p : left)
|
||||
graphic.drawText(p.pos.add(4, 0), p.label, Orientation.LEFTCENTER, Style.SHAPE_PIN);
|
||||
|
Loading…
x
Reference in New Issue
Block a user