2024年7月31日水曜日

draw.io の PMOS シンボルを作る

draw.io を使おうと試行錯誤しているのだが,PMOS のシンボルが気に入らない.なのでテンプレートを元に編集して作ってみた. 
  1. <shape aspect="fixed" h="110" name="PMOS" strokewidth="inherit" w="70">
  2. <connections>
  3. <constraint name="NE" perimeter="0" x="1" y="0" />
  4. <constraint name="SE" perimeter="0" x="1" y="1" />
  5. <constraint name="W" perimeter="0" x="0" y="0.5" />
  6. </connections>
  7. <background>
  8. <save />
  9. <ellipse h="10" w="10" x="30" y="50" />
  10. </background>
  11. <foreground>
  12. <stroke />
  13. <path>
  14. <move x="41" y="35" />
  15. <line x="41" y="75" />
  16. </path>
  17. <stroke />
  18. <path>
  19. <move x="70" y="0" />
  20. <line x="70" y="35" />
  21. <line x="45" y="35" />
  22. <line x="45" y="75" />
  23. <line x="70" y="75" />
  24. <line x="70" y="110" />
  25. </path>
  26. <stroke />
  27. <path>
  28. <move x="0" y="55" />
  29. <line x="30" y="55" />
  30. </path>
  31. <stroke />
  32. <restore />
  33. <rect />
  34. <stroke />
  35. <fillstroke />
  36. </foreground>
  37. </shape>
 

ついでに NMOS も.
  1. <shape aspect="fixed" h="110" name="NMOS" strokewidth="inherit" w="70">
  2. <connections>
  3. <constraint name="NE" perimeter="0" x="1" y="0" />
  4. <constraint name="SE" perimeter="0" x="1" y="1" />
  5. <constraint name="W" perimeter="0" x="0" y="0.5" />
  6. </connections>
  7. <background>
  8. <save />
  9. </background>
  10. <foreground>
  11. <stroke />
  12. <path>
  13. <move x="41" y="35" />
  14. <line x="41" y="75" />
  15. </path>
  16. <stroke />
  17. <path>
  18. <move x="70" y="0" />
  19. <line x="70" y="35" />
  20. <line x="45" y="35" />
  21. <line x="45" y="75" />
  22. <line x="70" y="75" />
  23. <line x="70" y="110" />
  24. </path>
  25. <stroke />
  26. <path>
  27. <move x="0" y="55" />
  28. <line x="41" y="55" />
  29. </path>
  30. <stroke />
  31. <restore />
  32. <rect />
  33. <stroke />
  34. <fillstroke />
  35. </foreground>
  36. </shape>
 

ついでに,4端子版の PMOS と NMOS も作ってみた.
  1. <shape aspect="fixed" h="110" name="PMOS4" strokewidth="inherit" w="70">
  2. <connections>
  3. <constraint name="NE" perimeter="0" x="1" y="0" />
  4. <constraint name="SE" perimeter="0" x="1" y="1" />
  5. <constraint name="W" perimeter="0" x="0" y="0.5" />
  6. </connections>
  7. <background>
  8. <save />
  9. <ellipse h="10" w="10" x="30" y="50" />
  10. </background>
  11. <foreground>
  12. <stroke />
  13. <path>
  14. <move x="41" y="35" />
  15. <line x="41" y="75" />
  16. </path>
  17. <stroke />
  18. <path>
  19. <move x="70" y="0" />
  20. <line x="70" y="35" />
  21. <line x="45" y="35" />
  22. <line x="45" y="75" />
  23. <line x="70" y="75" />
  24. <line x="70" y="110" />
  25. </path>
  26. <stroke />
  27. <path>
  28. <move x="0" y="55" />
  29. <line x="30" y="55" />
  30. </path>
  31. <stroke />
  32. <path>
  33. <move x="70" y="55" />
  34. <line x="45" y="55" />
  35. </path>
  36. <stroke />
  37. <restore />
  38. <rect />
  39. <stroke />
  40. <fillstroke />
  41. </foreground>
  42. </shape>
 
  1. <shape aspect="fixed" h="110" name="NMOS4" strokewidth="inherit" w="70">
  2. <connections>
  3. <constraint name="NE" perimeter="0" x="1" y="0" />
  4. <constraint name="SE" perimeter="0" x="1" y="1" />
  5. <constraint name="W" perimeter="0" x="0" y="0.5" />
  6. </connections>
  7. <background>
  8. <save />
  9. </background>
  10. <foreground>
  11. <stroke />
  12. <path>
  13. <move x="41" y="35" />
  14. <line x="41" y="75" />
  15. </path>
  16. <stroke />
  17. <path>
  18. <move x="70" y="0" />
  19. <line x="70" y="35" />
  20. <line x="45" y="35" />
  21. <line x="45" y="75" />
  22. <line x="70" y="75" />
  23. <line x="70" y="110" />
  24. </path>
  25. <stroke />
  26. <path>
  27. <move x="0" y="55" />
  28. <line x="41" y="55" />
  29. </path>
  30. <stroke />
  31. <path>
  32. <move x="70" y="55" />
  33. <line x="45" y="55" />
  34. </path>
  35. <stroke />
  36. <restore />
  37. <rect />
  38. <stroke />
  39. <fillstroke />
  40. </foreground>
  41. </shape>
 

できあがりはこんな感じ.コピペして使います.


テンプレートそのものを編集できれば良いのだけれど.

参考:

0 件のコメント:

コメントを投稿