| 4025 | } |
| 4026 | |
| 4027 | function _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 | |
| 4048 | function _drawRadioGroup(page, field, widget, rect) { |
| 4049 | let selected = null; |