iT邦幫忙

2025 iThome 鐵人賽

DAY 21
0

今天來展示另一個功能 get-ctx:這個功能有一點點像是之前提到過的 context 功能,只要是繪製出來以後才能得到的資訊,就可以使用 get-ctx 來傳入一個函式等著被呼叫。

一個直接可以使用的功能就是 coordinate.resolve,這可以根據當前繪製的圖片取得座標。另一個可以使用的功能就是 intersections,目前支援兩條折線之間的交點、以及直線與圓之間的交點。

https://ithelp.ithome.com.tw/upload/images/20250904/201123762DM4Zdgtcs.png

成果如下:

https://ithelp.ithome.com.tw/upload/images/20250904/201123765YAhxTdfdy.png


上一篇
Day 20: 摺紙序列
下一篇
Day 22: Typst Universe
系列文
Typst 與 CeTZ:對演算法與程式設計超友好的排版製圖工具29
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言