MCPcopy Create free account
hub / github.com/OpenSignLabs/OpenSign / _drawCheckBox

Function _drawCheckBox

apps/OpenSign/src/constant/Utils.js:4027–4046  ·  view source on GitHub ↗
(page, field, rect, zapf)

Source from the content-addressed store, hash-verified

4025}
4026
4027function _drawCheckBox(page, field, rect, zapf) {
4028 let checked = false;
4029 try {
4030 checked = field.isChecked();
4031 } catch {
4032 checked = false;
4033 }
4034
4035 if (!checked) return;
4036
4037 const size = Math.max(8, Math.min(rect.width, rect.height) - 4);
4038
4039 page.drawText("\u2714", {
4040 x: rect.x + Math.max(1, (rect.width - size * 0.7) / 2),
4041 y: rect.y + Math.max(1, (rect.height - size) / 2),
4042 size,
4043 font: zapf,
4044 color: rgb(0, 0, 0)
4045 });
4046}
4047
4048function _drawRadioGroup(page, field, widget, rect) {
4049 let selected = null;

Callers 1

flattenPdfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected