为什么有 gdi 的别名图形?
Why are there aliasing drawings with gdi?
为什么 gdi 有锯齿图形?甚至不缩放它。
如果我不缩放它,我认为它不会出现别名。
而且用SVG画圆不会走样
我猜 "sawtooth" 你的意思是 aliasing. GDI is about 30 years old. Since antialiasing requires quite a lot of computation power it's support has never been added. It is technically possible to draw smooth images using GDI and some additional code,但是最好使用支持开箱即用抗锯齿的更新 API,例如 Direct2D 或至少 GDI+。
此外,svg 只是一种基于 xml 的文件格式。你不需要 "draw" 任何 svg,你只是用 svg 描述图像,然后用一些渲染引擎渲染它,比如 cairo。如果您使用纯 GDI 渲染 svg,您仍然会得到锯齿图像。
为什么 gdi 有锯齿图形?甚至不缩放它。
如果我不缩放它,我认为它不会出现别名。
而且用SVG画圆不会走样
我猜 "sawtooth" 你的意思是 aliasing. GDI is about 30 years old. Since antialiasing requires quite a lot of computation power it's support has never been added. It is technically possible to draw smooth images using GDI and some additional code,但是最好使用支持开箱即用抗锯齿的更新 API,例如 Direct2D 或至少 GDI+。
此外,svg 只是一种基于 xml 的文件格式。你不需要 "draw" 任何 svg,你只是用 svg 描述图像,然后用一些渲染引擎渲染它,比如 cairo。如果您使用纯 GDI 渲染 svg,您仍然会得到锯齿图像。