Skip to content

Instantly share code, notes, and snippets.

View eav-eav-eav's full-sized avatar
💭
Studying

Eav eav-eav-eav

💭
Studying
View GitHub Profile
@eav-eav-eav
eav-eav-eav / GridScope.kt
Created April 7, 2023 14:22
Non-lazy Grid (Primitive)
package net.peanuuutz.compose.desktop
import androidx.compose.runtime.Immutable
import androidx.compose.ui.Modifier
@Immutable
interface GridScope {
fun Modifier.span(
span: GridSpanScope.() -> Int
): Modifier
@eav-eav-eav
eav-eav-eav / CachedDrawModifierNode.kt
Last active June 14, 2024 01:24
Modifier.Node Version of Modifier.drawWithCache
@file:OptIn(ExperimentalComposeUiApi::class)
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
package net.peanuuutz.compose.desktop
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.BuildDrawCacheParams
import androidx.compose.ui.draw.CacheDrawScope
import androidx.compose.ui.draw.DrawResult
@eav-eav-eav
eav-eav-eav / BorderWithEffect.kt
Created April 6, 2023 14:55
Compose Border with Effect
@file:OptIn(ExperimentalComposeUiApi::class)
package net.peanuuutz.compose.desktop
import androidx.compose.runtime.Stable
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.geometry.Size
import androidx.compose.ui.graphics.Brush