in share/src/sprite-editor/buttons.ts [517:551]
function drawRightButton(width: number, height: number, lip: number, border: number, r: number): ButtonGroup {
const root = new svg.Group().appendClass("sprite-editor-button");
const bg = root.draw("path")
.appendClass("sprite-editor-button-bg");
bg.d.moveTo(0, 0)
.lineBy(width - r, 0)
.arcBy(r, r, 0, false, true, r, r)
.lineBy(0, height - (r << 1))
.arcBy(r, r, 0, false, true, -r, r)
.lineBy(-(width - r), 0)
.lineBy(0, -height)
.close();
bg.update();
const fg = root.draw("path")
.appendClass("sprite-editor-button-fg");
fg.d.moveTo(border, border)
.lineBy(width - border - r, 0)
.arcBy(r, r, 0, false, true, r, r)
.lineBy(0, height - border - lip - (r << 1))
.arcBy(r, r, 0, false, true, -r, r)
.lineBy(-(width - border - r), 0)
.lineBy(0, -(height - border - lip))
.close();
fg.update();
const content = root.group().id("sprite-editor-button-content");
content.translate(border + (width - (border << 1)) >> 1, (height - lip - border) >> 1);
return {
root,
cx: width / 2,
cy: border + (height - lip) / 2
};
}