Where does a raster arc start at zero degrees?
arc measures angles clockwise from three o'clock and draws only the curved outline.
Pixel experiment and interpretation
Paint zero to ninety degrees on a square clock and probe right, bottom and center. The downward screen axis differs from a textbook Cartesian diagram.
from PIL import Image, ImageDraw
im=Image.new('L',(9,9))
ImageDraw.Draw(im).arc((0,0,8,8),0,90,fill=1)
[im.getpixel(p) for p in [(8,4),(4,8),(4,4)]]Result [1, 1, 0]
中文
绘制圆弧时零度指向何方?
arc 的角度从三点钟方向起,沿顺时针方向增加,只绘制轮廓。
像素实验与适用边界
将零到九十度画在方形时钟上,再探测右、下和中心。坐标轴向下增长,容易与数学课中的逆时针方向混淆。
from PIL import Image, ImageDraw
im=Image.new('L',(9,9))
ImageDraw.Draw(im).arc((0,0,8,8),0,90,fill=1)
[im.getpixel(p) for p in [(8,4),(4,8),(4,4)]]结果 [1, 1, 0]