Skip to content

Commit

Permalink
Merge pull request #763 from remap-keys/support-encoders-for-pdf
Browse files Browse the repository at this point in the history
Render encoders using circle.
  • Loading branch information
yoichiro authored Sep 21, 2023
2 parents 00e98a1 + 8e136d5 commit df786d0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/services/pdf/KeymapPdfGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,13 @@ export class KeymapPdfGenerator {
'',
'-'
)} v-${lenH5}, ${cw('', '-')} h${lenW6}`;
} else if (km.isEncoder) {
const radius = (box * km.w) / 2 - margin * 2;
path = `M ${margin},${margin * 2 + radius} A ${radius},${radius} 0 1 1 ${
radius * 2 + margin * 3
},${margin * 2 + radius} A ${radius},${radius} 0 1 1 ${margin},${
margin * 2 + radius
} Z`;
} else {
const lenW = roofWidth;
const lenH = roofHeight;
Expand Down

0 comments on commit df786d0

Please sign in to comment.