Added quality to export
This commit is contained in:
parent
30976427d6
commit
965c071aed
@ -898,7 +898,7 @@ function Library (client) {
|
|||||||
}
|
}
|
||||||
this.export = (name = 'ronin', type = 'image/png', quality = 1.0) => { // Exports a graphic file with format.
|
this.export = (name = 'ronin', type = 'image/png', quality = 1.0) => { // Exports a graphic file with format.
|
||||||
const ext = type === 'image/png' ? name + '.png' : name + '.jpg'
|
const ext = type === 'image/png' ? name + '.png' : name + '.jpg'
|
||||||
client.source.write(name, ext, client.surface.el.toDataURL(type, 1.0), type)
|
client.source.write(name, ext, client.surface.el.toDataURL(type, quality), type)
|
||||||
}
|
}
|
||||||
this.pos = (x = 0, y = 0) => { // Returns a position shape.
|
this.pos = (x = 0, y = 0) => { // Returns a position shape.
|
||||||
return { x, y }
|
return { x, y }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user