Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions domain/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies {
implementation(libs.androidx.ui.graphics.android)
implementation(libs.camerax.view)
implementation(libs.camerax.lifecycle)
implementation(libs.androidx.compose.ui.text)

testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.foke.together.domain.interactor.entity

import androidx.annotation.DrawableRes
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import com.foke.together.domain.R

abstract class CutFrame(
Expand All @@ -23,8 +25,11 @@ sealed class DefaultCutFrameSet (
frameImageSrc: Int, // !!!!! TODO: asset 에 추가 및 src 값을 넣어서 처리
photoPosition: List<PhotoPosition>,
additionalFrameImageSrc: List<Int>, // !!!!! TODO: asset 에 추가 및 src 값을 넣어서 처리
var copyrightPosition: TextStickerPosition,
var datePosition: TextStickerPosition,
var qrCodePosition: QrStickerPosition,
var isDateString: Boolean = false,
val dateStringHeight: Int = 0,
var isQrCode: Boolean = false
): CutFrame(index, frameTitle, cutCount, width, height, frameImageSrc, photoPosition, additionalFrameImageSrc) {
val cutFrameSetTitle = "기본"
val cutFrameCoverImageSrc = ""
Expand All @@ -41,22 +46,28 @@ sealed class DefaultCutFrameSet (
PhotoPosition(159, 106, 16, 258),
PhotoPosition(159, 106, 16, 369),
),
emptyList()
emptyList(),
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
qrCodePosition = QrStickerPosition(25,16,530)
)

data object FourCurDark: DefaultCutFrameSet(
8,
"같이네컷 다크",
4, 190, 570,
R.drawable.fourcut_frame_medium_dark,
listOf(
PhotoPosition(159, 106, 16, 36),
PhotoPosition(159, 106, 16, 147),
PhotoPosition(159, 106, 16, 258),
PhotoPosition(159, 106, 16, 369),
),
emptyList()
)
data object FourCurDark: DefaultCutFrameSet(
8,
"같이네컷 다크",
4, 190, 570,
R.drawable.fourcut_frame_medium_dark,
listOf(
PhotoPosition(159, 106, 16, 36),
PhotoPosition(159, 106, 16, 147),
PhotoPosition(159, 106, 16, 258),
PhotoPosition(159, 106, 16, 369),
),
emptyList(),
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(170, 170, 170), fontWeight = FontWeight.ExtraBold, fontSize = 6),
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(170, 170, 170), fontWeight = FontWeight.ExtraBold, fontSize = 6),
qrCodePosition = QrStickerPosition(25,16,530)
)

data object MakerFaire: DefaultCutFrameSet(
9,
Expand All @@ -69,114 +80,97 @@ sealed class DefaultCutFrameSet (
PhotoPosition(159, 106, 16, 258),
PhotoPosition(159, 106, 16, 369),
),
emptyList()
emptyList(),
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(238, 238, 238), fontWeight = FontWeight.ExtraBold, fontSize = 6),
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(238, 238, 238), fontWeight = FontWeight.ExtraBold, fontSize = 6),
qrCodePosition = QrStickerPosition(25,16,530)
)

data object Bride1: DefaultCutFrameSet(
3,
"신부 1",
data object MakerFaire25_1: DefaultCutFrameSet(
9,
"Maker Faire Seoul 2025 - 1",
4, 190, 570,
R.drawable.bride1,
R.drawable.maker_faire_frame_25_1,
listOf(
PhotoPosition(172, 115, 9, 9),
PhotoPosition(172, 115, 9, 133),
PhotoPosition(172, 115, 9, 256),
PhotoPosition(172, 115, 9, 383),
PhotoPosition(171, 114, 9, 20),
PhotoPosition(171, 114, 9, 148),
PhotoPosition(171, 114, 9, 269),
PhotoPosition(171, 114, 9, 389),
),
emptyList(),
dateStringHeight = 498
)

data object Bride2: DefaultCutFrameSet(
4,
"신부 2",
4, 190, 570,
R.drawable.bride2,
listOf(
PhotoPosition(172, 115, 9, 9),
PhotoPosition(172, 115, 9, 133),
PhotoPosition(172, 115, 9, 256),
PhotoPosition(172, 115, 9, 383),
R.drawable.maker_faire_frame_25_1
),
emptyList(),
dateStringHeight = 495
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
qrCodePosition = QrStickerPosition(25,149,517)
)

data object Groom1: DefaultCutFrameSet(
5,
"신랑 1",
data object MakerFaire25_2: DefaultCutFrameSet(
9,
"Maker Faire Seoul 2025 - 1",
4, 190, 570,
R.drawable.groom1,
R.drawable.maker_faire_frame_25_2,
listOf(
PhotoPosition(172, 115, 9, 9),
PhotoPosition(172, 115, 9, 133),
PhotoPosition(172, 115, 9, 256),
PhotoPosition(172, 115, 9, 383),
PhotoPosition(171, 114, 9, 20),
PhotoPosition(171, 114, 9, 148),
PhotoPosition(171, 114, 9, 269),
PhotoPosition(171, 114, 9, 389),
),
emptyList(),
dateStringHeight = 495
)

data object Groom2: DefaultCutFrameSet(
6,
"신랑 2",
4, 190, 570,
R.drawable.groom2,
listOf(
PhotoPosition(172, 115, 9, 9),
PhotoPosition(172, 115, 9, 133),
PhotoPosition(172, 115, 9, 256),
PhotoPosition(172, 115, 9, 383),
R.drawable.maker_faire_frame_25_2
),
emptyList(),
dateStringHeight = 495
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
qrCodePosition = QrStickerPosition(25,149,517)
)

data object Wedding1: DefaultCutFrameSet(
1,
"웨딩 1",
data object MakerFaire25_3: DefaultCutFrameSet(
9,
"Maker Faire Seoul 2025 - 3",
4, 190, 570,
R.drawable.wedding,
R.drawable.maker_faire_frame_25_3,
listOf(
PhotoPosition(172, 115, 9, 9),
PhotoPosition(172, 115, 9, 133),
PhotoPosition(172, 115, 9, 256),
PhotoPosition(172, 115, 9, 383),
PhotoPosition(171, 114, 9, 20),
PhotoPosition(171, 114, 9, 148),
PhotoPosition(171, 114, 9, 269),
PhotoPosition(171, 114, 9, 389),
),
listOf(
R.drawable.wedding_overlay1
R.drawable.maker_faire_frame_25_3
),
dateStringHeight = 495
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
qrCodePosition = QrStickerPosition(25,149,517)
)

data object Wedding2: DefaultCutFrameSet(
2,
"웨딩 2",
data object MakerFaire25_4: DefaultCutFrameSet(
9,
"Maker Faire Seoul 2025 - 4",
4, 190, 570,
R.drawable.wedding,
R.drawable.maker_faire_frame_25_4,
listOf(
PhotoPosition(172, 115, 9, 9),
PhotoPosition(172, 115, 9, 133),
PhotoPosition(172, 115, 9, 256),
PhotoPosition(172, 115, 9, 383),
PhotoPosition(171, 114, 9, 20),
PhotoPosition(171, 114, 9, 148),
PhotoPosition(171, 114, 9, 269),
PhotoPosition(171, 114, 9, 389),
),
listOf(
R.drawable.wedding_overlay2
R.drawable.maker_faire_frame_25_4
),
dateStringHeight = 495
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
qrCodePosition = QrStickerPosition(25,149,517)
)

companion object {
val entries = listOf(
FourCutLight,
FourCurDark,
MakerFaire,
Wedding1,
Wedding2,
Bride1,
Bride2,
Groom1,
Groom2,
MakerFaire25_1,
MakerFaire25_2,
MakerFaire25_3,
MakerFaire25_4,
).sortedBy { it.index }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ data class PhotoPosition (
val height: Int,
val x: Int,
val y: Int,
val rotation: Float = 0f
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.foke.together.domain.interactor.entity

data class QrStickerPosition (
val size: Int,
val x: Int,
val y: Int,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.foke.together.domain.interactor.entity

import androidx.annotation.FontRes
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight

data class TextStickerPosition (
val x: Int,
val y: Int,
@FontRes val font: Int,
val color: Color,
val backgroundColor: Color = Color(0,0,0,0),
val fontWeight: FontWeight,
val fontSize: Int,
val rotation: Float = 0f
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified domain/src/main/res/drawable/fourcut_frame_medium_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified domain/src/main/res/drawable/fourcut_frame_medium_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified domain/src/main/res/drawable/maker_faire_frame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added domain/src/main/res/drawable/qr_sample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added domain/src/main/res/font/cascadia_mono.ttf
Binary file not shown.
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ junit = "4.13.2"
junit-version = "1.3.0"
espresso-core = "3.7.0"
coilCompose = "2.7.0"
uiText = "1.9.2"



Expand Down Expand Up @@ -157,6 +158,7 @@ androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "j
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso-core" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
coil-compose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coilCompose" }
androidx-compose-ui-text = { group = "androidx.compose.ui", name = "ui-text", version.ref = "uiText" }



Expand Down
Loading