We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
//cax/packages/cax/src/render/display/bitmap.js //22 行 util.getImageInWx(img, (result) => { this.img = result.img if (!this.rect) { this.rect = [0, 0, result.width, result.height] } // 这里把传入的宽 高 设置为图片的宽高 // 预期不应该修改传入的图片宽高 this.width = result.width this.height = result.height onLoad && onLoad.call(this) Bitmap.cache[img] = result })
//cax/packages/cax/src/render/render/canvas-render.js //122 行 ctx.drawImage(o.img, bRect[0], bRect[1], bRect[2], bRect[3], 0, 0, bRect[2], bRect[3]) // 预期应该按照传入的宽高裁剪 ctx.drawImage(o.img, bRect[0], bRect[1], bRect[2], bRect[3], 0, 0, this.width, this.height)
The text was updated successfully, but these errors were encountered:
请问一下是出于什么方面考虑的呢😥
Sorry, something went wrong.
今晚也遇到这个问题,才代码来看,bitmap和Sprite都是以图片实际尺寸大小去渲染的,想控制展示时的大小,只能通过放大缩小了。
No branches or pull requests
The text was updated successfully, but these errors were encountered: