MCPcopy Create free account
hub / github.com/devforth/painterro / doCrop

Method doCrop

js/selecter.js:33–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 }
32
33 doCrop() {
34 const imgData = this.ctx.getImageData(0, 0, this.main.size.w, this.main.size.h);
35 this.main.resize(
36 this.area.bottoml[0] - this.area.topl[0],
37 this.area.bottoml[1] - this.area.topl[1]);
38 this.main.ctx.putImageData(imgData, -this.area.topl[0], -this.area.topl[1]);
39 this.main.adjustSizeFull();
40 this.main.worklog.captureState();
41 }
42
43 doPixelize() {
44 const c = this.area.topl;

Callers 1

constructorMethod · 0.80

Calls 3

resizeMethod · 0.80
adjustSizeFullMethod · 0.80
captureStateMethod · 0.80

Tested by

no test coverage detected