|
|
|
|
|
|
public readonly float devicePixelRatio; |
|
|
|
|
|
|
|
public void draw(Canvas canvas) { |
|
|
|
var bounds = canvas.getTotalMatrix().mapRect(this.logicalRect).roundOut(); |
|
|
|
var bounds = canvas.getTotalMatrix().mapRect(this.logicalRect).roundOut(this.devicePixelRatio); |
|
|
|
|
|
|
|
D.assert(() => { |
|
|
|
var textureWidth = Mathf.CeilToInt(bounds.width * this.devicePixelRatio); |
|
|
|
|
|
|
D.assert(this.image.height == textureHeight); |
|
|
|
return true; |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
canvas.save(); |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
RasterCacheResult _rasterizePicture(Picture picture, Matrix3 transform, float devicePixelRatio, |
|
|
|
MeshPool meshPool) { |
|
|
|
var bounds = transform.mapRect(picture.paintBounds).roundOut(); |
|
|
|
var bounds = transform.mapRect(picture.paintBounds).roundOut(devicePixelRatio); |
|
|
|
|
|
|
|
var desc = new RenderTextureDescriptor( |
|
|
|
Mathf.CeilToInt((bounds.width * devicePixelRatio)), |
|
|
|