Additional Litho descriptors

Summary: Moved to separate directory. These additional descriptors are useful for debugging the implementation but might not be useful for the end users so could potentially be removed down the road

Reviewed By: lblasa

Differential Revision: D40021834

fbshipit-source-id: f88c1186dd65cdabc816d5cd8256bb81c404a80c
This commit is contained in:
Luke De Feo
2022-10-10 04:13:06 -07:00
committed by Facebook GitHub Bot
parent 221f7ac1e5
commit b911c49667
8 changed files with 219 additions and 120 deletions

View File

@@ -7,6 +7,7 @@
package com.facebook.flipper.plugins.uidebugger.model
import android.graphics.Rect
import com.facebook.flipper.plugins.uidebugger.common.InspectableObject
import com.facebook.flipper.plugins.uidebugger.descriptors.Id
@@ -22,4 +23,10 @@ data class Node(
)
@kotlinx.serialization.Serializable
data class Bounds(val x: Int, val y: Int, val width: Int, val height: Int)
data class Bounds(val x: Int, val y: Int, val width: Int, val height: Int) {
companion object {
fun fromRect(rect: Rect): Bounds {
return Bounds(rect.left, rect.top, rect.width(), rect.height())
}
}
}