MiuixLayerBackdrop class

通过捕获的图层快照提供背景的 MiuixBackdrop。对应 Kotlin LayerBackdrop。

用 MiuixLayerBackdropCapture 包裹背景容器来录制其渲染输出,再把本对象传给 模糊组件。用 rememberMiuixLayerBackdrop 或直接 MiuixLayerBackdrop() 创建, 需在 dispose 时释放。

Inheritance

Constructors

MiuixLayerBackdrop()

Properties

globalOffset → Offset?
快照左上角的全局坐标,读取时才计算。对应 Kotlin LayerBackdrop.layerCoordinates 在消费者绘制时读 positionInWindow(),而不是记录录制那一刻的位置。
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
isCoordinatesDependent → bool
是否需要布局坐标来正确定位(图层型 backdrop 为 true)。 对应 Kotlin isCoordinatesDependent。
no setteroverride
pixelRatio → double
快照的设备像素比(快照按此比例录制)。
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
snapshot → Image?
当前可用于取样的背景快照;未捕获时为 null。
no setteroverride

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
registerCapture(RenderBox capture) → void
由 MiuixLayerBackdropCapture 的渲染对象在 attach 时登记自身,供 globalOffset 实时取坐标。
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() → String
A string representation of this object.
inherited
unregisterCapture(RenderBox capture) → void
由 MiuixLayerBackdropCapture 的渲染对象在 detach / 换 backdrop 时注销。
updateSnapshot(Image image, Offset globalOffset, double pixelRatio) → void
由 MiuixLayerBackdropCapture 在每帧录制后调用,更新快照与坐标。

Operators

operator ==(Object other) → bool
The equality operator.
inherited