Pycairo とはなんぞや?
• Pycairois a Python module providing bindings for the cairo
graphics library. It depends on cairo >= 1.15.10 and works
with Python 3.7+. Pycairo, including this documentation, is
licensed under the LGPL-2.1-only OR MPL-1.1.
あ~そうかそうか Pycairo の前に Cario があるのか、、、
https://pycairo.readthedocs.io/en/latest/
4.
Cairo とはなんぞや?
• Cairois a 2D graphics library with support for multiple output
devices. Currently supported output targets include the X
Window System (via both Xlib and XCB), Quartz, Win32,
image buffers, PostScript, PDF, and SVG file output.
Experimental backends include OpenGL, BeOS, OS/2, and
DirectFB.
• まぁ平たく言うと 2D のグラフィック・ライブラリだ。
お絵描きが出来る。
https://cairographics.org/
エラー
• math がたりない
•import math が必要
• 修正して再実行
• できた!
File "t3.py", line 22, in <module>
context.arc(x+w-r-1, y+r, r, -0.5*math.pi, 0)
NameError: name 'math' is not defined