Skip to content

Commit

Permalink
Merge pull request #25 from SOPT-all/init/setting-shadow
Browse files Browse the repository at this point in the history
[init] shadow 기초세팅
  • Loading branch information
beom84 authored Jan 15, 2025
2 parents b88d8ee + 1a73d8e commit c283904
Show file tree
Hide file tree
Showing 2 changed files with 219 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
package org.android.bbangzip.presentation.type

import androidx.compose.ui.unit.dp
import org.android.bbangzip.ui.theme.defaultBbangZipColors
import org.android.bbangzip.ui.theme.defaultBbangZipOpacity
import org.android.bbangzip.ui.theme.model.ShadowOption

enum class BbangZipShadowType(
val shadowOptions: List<ShadowOption>,
) {
EMPTY(
listOf(),
),
NORMAL(
listOf(
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12),
blur = 2.dp,
offsetX = 0.dp,
offsetY = 1.dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 1.dp,
offsetX = 0.dp,
offsetY = 0.dp,
spread = 0.dp,
),
),
),
EMPHASIZE(
listOf(
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12),
blur = 8.dp,
offsetX = 0.dp,
offsetY = 2.dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 4.dp,
offsetX = 0.dp,
offsetY = 1.dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 1.dp,
offsetX = 0.dp,
offsetY = 0.dp,
spread = 0.dp,
),
),
),
STRONG(
listOf(
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12),
blur = 12.dp,
offsetX = 0.dp,
offsetY = 6.dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12),
blur = 8.dp,
offsetX = 0.dp,
offsetY = 4.dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 4.dp,
offsetX = 0.dp,
offsetY = 0.dp,
spread = 0.dp,
),
),
),
HEAVY(
listOf(
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12),
blur = 20.dp,
offsetX = 0.dp,
offsetY = 16.dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 16.dp,
offsetX = 0.dp,
offsetY = 8.dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 8.dp,
offsetX = 0.dp,
offsetY = 0.dp,
spread = 0.dp,
),
),
),
HEAVY_INVERSE(
listOf(
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12),
blur = 20.dp,
offsetX = 0.dp,
offsetY = (-16).dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 16.dp,
offsetX = 0.dp,
offsetY = (-8).dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 8.dp,
offsetX = 0.dp,
offsetY = 0.dp,
spread = 0.dp,
),
),
),
STRONG_INVERSE(
listOf(
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12),
blur = 12.dp,
offsetX = 0.dp,
offsetY = (-6).dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 8.dp,
offsetX = 0.dp,
offsetY = (-4).dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 4.dp,
offsetX = 0.dp,
offsetY = 0.dp,
spread = 0.dp,
),
),
),
EMPHASIZE_INVERSE(
listOf(
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12),
blur = 8.dp,
offsetX = 0.dp,
offsetY = (-2).dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 4.dp,
offsetX = 0.dp,
offsetY = (-1).dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 1.dp,
offsetX = 0.dp,
offsetY = 0.dp,
spread = 0.dp,
),
),
),
NORMAL_INVERSE(
listOf(
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity12),
blur = 2.dp,
offsetX = 0.dp,
offsetY = (-1).dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 1.dp,
offsetX = 0.dp,
offsetY = 0.dp,
spread = 0.dp,
),
ShadowOption(
color = defaultBbangZipColors.staticBlack_000000.copy(defaultBbangZipOpacity.opacity8),
blur = 1.dp,
offsetX = 0.dp,
offsetY = 0.dp,
spread = 0.dp,
),
),
),
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.android.bbangzip.ui.theme.model

import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.Dp

data class ShadowOption(
val color: Color,
val blur: Dp,
val offsetX: Dp,
val offsetY: Dp,
val spread: Dp,
)

0 comments on commit c283904

Please sign in to comment.