提交 6fef702c 编写于 作者: I Ian Hickson 提交者: GitHub

Trivial fixes to dart:ui docs. (#3689)

上级 87398c9c
......@@ -186,7 +186,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
/// system.
///
/// The `transform` is a matrix that maps this node's coodinate system into
/// its parent's coordate system.
/// its parent's coordinate system.
void updateNode({
int id,
int flags,
......@@ -197,7 +197,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 {
Int32List children
}) {
if (transform.length != 16)
throw new ArgumentError("[transform] must have 16 entries.");
throw new ArgumentError('transform argument must have 16 entries.');
_updateNode(id,
flags,
actions,
......
......@@ -110,6 +110,16 @@ class Window {
/// The number of device pixels for each logical pixel. This number might not
/// be a power of two. Indeed, it might not even be an integer. For example,
/// the Nexus 6 has a device pixel ratio of 3.5.
///
/// Device pixels are also referred to as physical pixels. Logical pixels are
/// also referred to as device-independent or resolution-independent pixels.
///
/// By definition, there are roughly 38 logical pixels per centimeter, or
/// about 96 logical pixels per inch, of the physical display. The value
/// returned by [devicePixelRatio] is ultimately obtained either from the
/// hardware itself, the device drivers, or a hard-coded value stored in the
/// operating system or firmware, and may be inaccurate, sometimes by a
/// significant margin.
double get devicePixelRatio => _devicePixelRatio;
double _devicePixelRatio = 1.0;
......@@ -127,7 +137,9 @@ class Window {
WindowPadding _padding = WindowPadding.zero;
/// A callback that is invoked whenever the [devicePixelRatio],
/// [physicalSize], or [padding] values change.
/// [physicalSize], or [padding] values change, for example when the device is
/// rotated or when the application is resized (e.g. when showing applications
/// side-by-side on Android).
VoidCallback onMetricsChanged;
/// The system-reported locale.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册