-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[zh-cn]: update the translation of CanvasRenderingContext2D.stroke()
method
#22030
base: main
Are you sure you want to change the base?
Conversation
Preview URLs Flaws (1)URL:
External URLs (1)URL:
(comment last updated: 2024-07-07 16:11:58) |
--- | ||
|
||
{{APIRef}} | ||
|
||
**`CanvasRenderingContext2D.stroke()`** 是 Canvas 2D API 使用非零环绕规则,根据当前的画线样式,绘制当前或已经存在的路径的方法。 | ||
Canvas 2D API 的 **`CanvasRenderingContext2D.stroke()`** 方法用于使用非零环绕规则,根据当前的画线样式,绘制当前或已经存在的路径的方法。 |
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.
请再对一下翻译
@@ -44,6 +54,86 @@ ctx.stroke(); | |||
|
|||
{{ EmbedLiveSample('一个简单的矩形轮廓线', 700, 180) }} | |||
|
|||
### 重新描边路径 | |||
|
|||
通常情况下,每当你想要描边新的内容时,应调用 {{domxref("CanvasRenderingContext2D.beginPath()", "beginPath()")}} 方法。如果不这样做,之前的子路径将保留在当前路径中,并且每次调用 `stroke()` 方法时都会被描边。然而,在某些情况下,这可能是期望的效果。 |
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.
修改一下
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.
是有什么问题吗
Co-authored-by: A1lo <yin199909@aliyun.com>
|
||
- `path` | ||
- : 绘制的路径{{domxref("Path2D")}} 。 | ||
- : 要描边的路径 {{domxref("Path2D")}} 。 |
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.
- : 要描边的路径 {{domxref("Path2D")}} 。 | |
- : 要描边的 {{domxref("Path2D")}} 路径。 |
…` method
Description
Motivation
Additional details
Related issues and pull requests