Skip to content

Commit 5af400d

Browse files
committed
update engine
1 parent 9b1975f commit 5af400d

File tree

6 files changed

+103
-21
lines changed

6 files changed

+103
-21
lines changed

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/about.html

+14-10
Original file line numberDiff line numberDiff line change
@@ -240,19 +240,23 @@ <h2><a id="drawing">Functions for Drawing</a></h2>
240240
* ADVANCED DRAWING-RELATED FUNCTIONS
241241
*/
242242

243+
// return the current canvas context 2D
244+
ctx(): CanvasRenderingContext2D
245+
243246
// save the canvas context
244247
push(): void
245248

246249
// restore the canvas context
247250
pop(): void
248251

249-
// create a clipping region using a path
250-
// example: clip((ctx) => ctx.arc(100, 100, 50, 0, PI * 2))
251-
// note: Clip paths cannot be reverted directly. You must save your
252-
// canvas state using push() before calling clip(), and restore it
253-
// once you have finished drawing in the clipped area using pop().
254-
// see: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/clip
255-
clip(callback: function): void
252+
// create a rectangular clipping region
253+
cliprect(x, y, width, height): void
254+
255+
// create a circular clipping region
256+
clipcirc(x, y, width, height): void
257+
258+
// note: before call cliprect or clipcirc you must save the context using push()
259+
// and later, you restore the context using pop()
256260

257261
// Adds a translation transformation to the current matrix
258262
translate(x = 0, y = 0): void
@@ -264,11 +268,11 @@ <h2><a id="drawing">Functions for Drawing</a></h2>
264268
rotate(radians = 0): void
265269

266270
// update the transformation matrix
267-
// when `reset = true` uses `context.setTransform()`
268-
// wwhen `reset = false` uses `context.transform()`
271+
// when `resetFirst = true` uses `context.setTransform()`
272+
// wwhen `resetFirst = false` uses `context.transform()`
269273
// see: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setTransform
270274
// see: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/transform
271-
transform(a, b, c, d, e, f, reset = true): void
275+
transform(a, b, c, d, e, f, resetFirst = true): void
272276

273277
// update the alpha (transparency)
274278
// see: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalAlpha

public/app.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/litecanvas.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/sw.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const cacheName = "luizbills.litecanvas-editor-v1";
2-
const version = "1.30.1";
2+
const version = "1.31.0";
33

44
const precacheResources = [
55
"/",

0 commit comments

Comments
 (0)