Home  >  Q&A  >  body text

html5 - canvas里的dramImage画好的图是图片精灵合起来的,想拿到其中一部分,怎么做高效?

canvas里的dramImage画好的图是图片精灵合起来的,想拿到其中一部分,怎么做高效?
求助JS大神

PHP中文网PHP中文网2765 days ago447

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 13:54:01

    drawimage provides parameter cutting pictures, which can display pictures at specific locations and sizes.
    If you want to be efficient, you can draw the image into a new canvas, and then drawimage the canvas, the performance will be significantly improved

    reply
    0
  • Cancelreply