开发者

Loading SVG files with python and pygame [duplicate]

开发者 https://www.devze.com 2023-02-23 08:01 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: SVG rendering in a PyGame ap开发者_如何转开发plication
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

SVG rendering in a PyGame ap开发者_如何转开发plication

Can I load .svg files created by inkscape to python via pygame? And if so, how I can do it?


No you cannot, PyGame supports following image formats:

  • JPG
  • PNG
  • GIF (non animated)
  • BMP
  • PCX
  • TGA (uncompressed)
  • TIF
  • LBM (and PBM)
  • PBM (and PGM, PPM)
  • XPM

You can however rasterize that SVG using Cairo RSVG library. There is some documentation for that on PyGame's web.

0

精彩评论

暂无评论...
验证码 换一张
取 消