-
Notifications
You must be signed in to change notification settings - Fork 4
Update pointer.md #25
base: master
Are you sure you want to change the base?
Conversation
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中的每个控件都提供了如下事件,允许开发者追踪定点设备的移动、点击与滚动: |
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.
abstraction 翻译为 ”抽象“ 更好
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.
abstraction 翻译为 ”抽象“ 更好
我没有逐词翻译这句话。我认为这有一定的难度,以我的水平最好只是将它以意译的方式翻译出来以保证通顺并提高可阅读性。同时,我认为abstraction在此处并不适合翻译为“抽象”,而是最好将它翻译为“概念”或别的名词性词语。
docs/input/pointer.md
Outdated
@@ -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);` |
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.
如果你想要获取相对于某个控件的坐标,你可以将该控件传入PointerEventArgs.GetCurrentPoint
方法,如:var pointControlCoords = args.GetCurrentPoint(control);
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.
如果你想要获取相对于某个控件的坐标,你可以将该控件传入
PointerEventArgs.GetCurrentPoint
方法,如:var pointControlCoords = args.GetCurrentPoint(control);
我认为你的翻译是正确的,非常抱歉我使用了错误的翻译。我在翻译时因未完全理解“pass it”的含义而导致了这个错误。
修正了一个翻译错误。
Translated the page.
翻译了页面。