Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Update pointer.md #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Staccato-kashi
Copy link

Translated the page.
翻译了页面。

Translated the page.
翻译了页面。
@@ -1,14 +1,14 @@
# 鼠标与触控设备

Avalonia operates on the abstraction called pointer devices. These devices including, but not limited to mouse, touch, pen etc. Each control in Avalonia provides following events which allow developer to subscribe to the pointer device movements, clicks and wheel movements:
Avalonia 可工作于我们称之为“定点设备”的基础上。这类设备包括但不限于鼠标、触摸板与数位笔等。Avalonia中的每个控件都提供了如下事件,允许开发者追踪定点设备的移动、点击与滚动:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

abstraction 翻译为 ”抽象“ 更好

Copy link
Author

@Staccato-kashi Staccato-kashi Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

abstraction 翻译为 ”抽象“ 更好

我没有逐词翻译这句话。我认为这有一定的难度,以我的水平最好只是将它以意译的方式翻译出来以保证通顺并提高可阅读性。同时,我认为abstraction在此处并不适合翻译为“抽象”,而是最好将它翻译为“概念”或别的名词性词语。

@@ -27,15 +27,15 @@ control.PointerPressed += (args) =>
}
```

In the example above, coordinates `x` and `y` are relatively to the window origin. If you want coordinates relative to the specific control, you may pass it to `PointerEventArgs.GetCurrentPoint` method like this: `var pointControlCoords = args.GetCurrentPoint(control);`
在上述实例中,坐标 `x` `y` 是相对于窗口原点定位的。如果你希望这些坐标相对定位于某个控件, 你可以将 `PointerEventArgs.GetCurrentPoint` 函数改成这样: `var pointControlCoords = args.GetCurrentPoint(control);`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些坐标相对于某个控件定位

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果你想要获取相对于某个控件的坐标,你可以将该控件传入PointerEventArgs.GetCurrentPoint方法,如:var pointControlCoords = args.GetCurrentPoint(control);

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果你想要获取相对于某个控件的坐标,你可以将该控件传入PointerEventArgs.GetCurrentPoint方法,如:var pointControlCoords = args.GetCurrentPoint(control);

我认为你的翻译是正确的,非常抱歉我使用了错误的翻译。我在翻译时因未完全理解“pass it”的含义而导致了这个错误。

修正了一个翻译错误。
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants