generated from napi-rs/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support maxWidth in fillText and strokeText
- Loading branch information
1 parent
9e94279
commit ccf33f3
Showing
7 changed files
with
104 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Canvas</title> | ||
</head> | ||
|
||
<body> | ||
<canvas width="1024" height="768" id="canvas"></canvas> | ||
|
||
<script> | ||
const canvas = document.getElementById('canvas'); | ||
const ctx = canvas.getContext('2d'); | ||
ctx.font = '50px serif'; | ||
ctx.fillText('Hello world', 50, 90, 140); | ||
|
||
ctx.fillText('Hello world', 250, 90); | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ccf33f3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
Draw house#skia-canvas
28
ops/sec (±0.06%
)20.6
ops/sec (±0.46%
)0.74
Draw house#node-canvas
21
ops/sec (±0.21%
)21.2
ops/sec (±0.58%
)1.01
Draw house#@napi-rs/skia
25
ops/sec (±0.31%
)22
ops/sec (±0.6%
)0.88
Draw gradient#skia-canvas
27
ops/sec (±0.42%
)19.6
ops/sec (±0.57%
)0.73
Draw gradient#node-canvas
20
ops/sec (±0.16%
)20.6
ops/sec (±0.76%
)1.03
Draw gradient#@napi-rs/skia
25
ops/sec (±0.04%
)20.9
ops/sec (±0.56%
)0.84
This comment was automatically generated by workflow using github-action-benchmark.