Skip to content

Commit b3983e5

Browse files
committed
modify CutFrameType entity for add more cutframes [#158]
1 parent 4eea1f0 commit b3983e5

File tree

18 files changed

+151
-92
lines changed

18 files changed

+151
-92
lines changed

domain/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ dependencies {
1414
implementation(libs.androidx.ui.graphics.android)
1515
implementation(libs.camerax.view)
1616
implementation(libs.camerax.lifecycle)
17+
implementation(libs.androidx.compose.ui.text)
1718

1819
testImplementation(libs.junit)
1920
androidTestImplementation(libs.androidx.junit)
Lines changed: 82 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.foke.together.domain.interactor.entity
22

33
import androidx.annotation.DrawableRes
4+
import androidx.compose.ui.graphics.Color
5+
import androidx.compose.ui.text.font.FontWeight
46
import com.foke.together.domain.R
57

68
abstract class CutFrame(
@@ -23,8 +25,11 @@ sealed class DefaultCutFrameSet (
2325
frameImageSrc: Int, // !!!!! TODO: asset 에 추가 및 src 값을 넣어서 처리
2426
photoPosition: List<PhotoPosition>,
2527
additionalFrameImageSrc: List<Int>, // !!!!! TODO: asset 에 추가 및 src 값을 넣어서 처리
28+
var copyrightPosition: TextStickerPosition,
29+
var datePosition: TextStickerPosition,
30+
var qrCodePosition: QrStickerPosition,
2631
var isDateString: Boolean = false,
27-
val dateStringHeight: Int = 0,
32+
var isQrCode: Boolean = false
2833
): CutFrame(index, frameTitle, cutCount, width, height, frameImageSrc, photoPosition, additionalFrameImageSrc) {
2934
val cutFrameSetTitle = "기본"
3035
val cutFrameCoverImageSrc = ""
@@ -41,22 +46,28 @@ sealed class DefaultCutFrameSet (
4146
PhotoPosition(159, 106, 16, 258),
4247
PhotoPosition(159, 106, 16, 369),
4348
),
44-
emptyList()
49+
emptyList(),
50+
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
51+
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
52+
qrCodePosition = QrStickerPosition(25,16,530)
4553
)
4654

47-
data object FourCurDark: DefaultCutFrameSet(
48-
8,
49-
"같이네컷 다크",
50-
4, 190, 570,
51-
R.drawable.fourcut_frame_medium_dark,
52-
listOf(
53-
PhotoPosition(159, 106, 16, 36),
54-
PhotoPosition(159, 106, 16, 147),
55-
PhotoPosition(159, 106, 16, 258),
56-
PhotoPosition(159, 106, 16, 369),
57-
),
58-
emptyList()
59-
)
55+
data object FourCurDark: DefaultCutFrameSet(
56+
8,
57+
"같이네컷 다크",
58+
4, 190, 570,
59+
R.drawable.fourcut_frame_medium_dark,
60+
listOf(
61+
PhotoPosition(159, 106, 16, 36),
62+
PhotoPosition(159, 106, 16, 147),
63+
PhotoPosition(159, 106, 16, 258),
64+
PhotoPosition(159, 106, 16, 369),
65+
),
66+
emptyList(),
67+
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(170, 170, 170), fontWeight = FontWeight.ExtraBold, fontSize = 6),
68+
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(170, 170, 170), fontWeight = FontWeight.ExtraBold, fontSize = 6),
69+
qrCodePosition = QrStickerPosition(25,16,530)
70+
)
6071

6172
data object MakerFaire: DefaultCutFrameSet(
6273
9,
@@ -69,114 +80,97 @@ sealed class DefaultCutFrameSet (
6980
PhotoPosition(159, 106, 16, 258),
7081
PhotoPosition(159, 106, 16, 369),
7182
),
72-
emptyList()
83+
emptyList(),
84+
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(238, 238, 238), fontWeight = FontWeight.ExtraBold, fontSize = 6),
85+
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(238, 238, 238), fontWeight = FontWeight.ExtraBold, fontSize = 6),
86+
qrCodePosition = QrStickerPosition(25,16,530)
7387
)
7488

75-
data object Bride1: DefaultCutFrameSet(
76-
3,
77-
"신부 1",
89+
data object MakerFaire25_1: DefaultCutFrameSet(
90+
9,
91+
"Maker Faire Seoul 2025 - 1",
7892
4, 190, 570,
79-
R.drawable.bride1,
93+
R.drawable.maker_faire_frame_25_1,
8094
listOf(
81-
PhotoPosition(172, 115, 9, 9),
82-
PhotoPosition(172, 115, 9, 133),
83-
PhotoPosition(172, 115, 9, 256),
84-
PhotoPosition(172, 115, 9, 383),
95+
PhotoPosition(171, 114, 9, 20),
96+
PhotoPosition(171, 114, 9, 148),
97+
PhotoPosition(171, 114, 9, 269),
98+
PhotoPosition(171, 114, 9, 389),
8599
),
86-
emptyList(),
87-
dateStringHeight = 498
88-
)
89-
90-
data object Bride2: DefaultCutFrameSet(
91-
4,
92-
"신부 2",
93-
4, 190, 570,
94-
R.drawable.bride2,
95100
listOf(
96-
PhotoPosition(172, 115, 9, 9),
97-
PhotoPosition(172, 115, 9, 133),
98-
PhotoPosition(172, 115, 9, 256),
99-
PhotoPosition(172, 115, 9, 383),
101+
R.drawable.maker_faire_frame_25_1
100102
),
101-
emptyList(),
102-
dateStringHeight = 495
103+
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
104+
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
105+
qrCodePosition = QrStickerPosition(25,149,517)
103106
)
104107

105-
data object Groom1: DefaultCutFrameSet(
106-
5,
107-
"신랑 1",
108+
data object MakerFaire25_2: DefaultCutFrameSet(
109+
9,
110+
"Maker Faire Seoul 2025 - 1",
108111
4, 190, 570,
109-
R.drawable.groom1,
112+
R.drawable.maker_faire_frame_25_2,
110113
listOf(
111-
PhotoPosition(172, 115, 9, 9),
112-
PhotoPosition(172, 115, 9, 133),
113-
PhotoPosition(172, 115, 9, 256),
114-
PhotoPosition(172, 115, 9, 383),
114+
PhotoPosition(171, 114, 9, 20),
115+
PhotoPosition(171, 114, 9, 148),
116+
PhotoPosition(171, 114, 9, 269),
117+
PhotoPosition(171, 114, 9, 389),
115118
),
116-
emptyList(),
117-
dateStringHeight = 495
118-
)
119-
120-
data object Groom2: DefaultCutFrameSet(
121-
6,
122-
"신랑 2",
123-
4, 190, 570,
124-
R.drawable.groom2,
125119
listOf(
126-
PhotoPosition(172, 115, 9, 9),
127-
PhotoPosition(172, 115, 9, 133),
128-
PhotoPosition(172, 115, 9, 256),
129-
PhotoPosition(172, 115, 9, 383),
120+
R.drawable.maker_faire_frame_25_2
130121
),
131-
emptyList(),
132-
dateStringHeight = 495
122+
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
123+
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
124+
qrCodePosition = QrStickerPosition(25,149,517)
133125
)
134126

135-
data object Wedding1: DefaultCutFrameSet(
136-
1,
137-
"웨딩 1",
127+
data object MakerFaire25_3: DefaultCutFrameSet(
128+
9,
129+
"Maker Faire Seoul 2025 - 3",
138130
4, 190, 570,
139-
R.drawable.wedding,
131+
R.drawable.maker_faire_frame_25_3,
140132
listOf(
141-
PhotoPosition(172, 115, 9, 9),
142-
PhotoPosition(172, 115, 9, 133),
143-
PhotoPosition(172, 115, 9, 256),
144-
PhotoPosition(172, 115, 9, 383),
133+
PhotoPosition(171, 114, 9, 20),
134+
PhotoPosition(171, 114, 9, 148),
135+
PhotoPosition(171, 114, 9, 269),
136+
PhotoPosition(171, 114, 9, 389),
145137
),
146138
listOf(
147-
R.drawable.wedding_overlay1
139+
R.drawable.maker_faire_frame_25_3
148140
),
149-
dateStringHeight = 495
141+
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
142+
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
143+
qrCodePosition = QrStickerPosition(25,149,517)
150144
)
151145

152-
data object Wedding2: DefaultCutFrameSet(
153-
2,
154-
"웨딩 2",
146+
data object MakerFaire25_4: DefaultCutFrameSet(
147+
9,
148+
"Maker Faire Seoul 2025 - 4",
155149
4, 190, 570,
156-
R.drawable.wedding,
150+
R.drawable.maker_faire_frame_25_4,
157151
listOf(
158-
PhotoPosition(172, 115, 9, 9),
159-
PhotoPosition(172, 115, 9, 133),
160-
PhotoPosition(172, 115, 9, 256),
161-
PhotoPosition(172, 115, 9, 383),
152+
PhotoPosition(171, 114, 9, 20),
153+
PhotoPosition(171, 114, 9, 148),
154+
PhotoPosition(171, 114, 9, 269),
155+
PhotoPosition(171, 114, 9, 389),
162156
),
163157
listOf(
164-
R.drawable.wedding_overlay2
158+
R.drawable.maker_faire_frame_25_4
165159
),
166-
dateStringHeight = 495
160+
datePosition = TextStickerPosition(139,541,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
161+
copyrightPosition = TextStickerPosition(122,547,R.font.cascadia_mono, color = Color(34, 34, 34), fontWeight = FontWeight.ExtraBold, fontSize = 6),
162+
qrCodePosition = QrStickerPosition(25,149,517)
167163
)
168164

169165
companion object {
170166
val entries = listOf(
171167
FourCutLight,
172168
FourCurDark,
173169
MakerFaire,
174-
Wedding1,
175-
Wedding2,
176-
Bride1,
177-
Bride2,
178-
Groom1,
179-
Groom2,
170+
MakerFaire25_1,
171+
MakerFaire25_2,
172+
MakerFaire25_3,
173+
MakerFaire25_4,
180174
).sortedBy { it.index }
181175
}
182176
}

domain/src/main/java/com/foke/together/domain/interactor/entity/PhotoPosition.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ data class PhotoPosition (
55
val height: Int,
66
val x: Int,
77
val y: Int,
8+
val rotation: Int = 0
89
)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.foke.together.domain.interactor.entity
2+
3+
data class QrStickerPosition (
4+
val size: Int,
5+
val x: Int,
6+
val y: Int,
7+
)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.foke.together.domain.interactor.entity
2+
3+
import androidx.annotation.FontRes
4+
import androidx.compose.ui.graphics.Color
5+
import androidx.compose.ui.text.font.FontWeight
6+
7+
data class TextStickerPosition (
8+
val x: Int,
9+
val y: Int,
10+
@FontRes val font: Int,
11+
val color: Color,
12+
val backgroundColor: Color = Color(0,0,0,0),
13+
val fontWeight: FontWeight,
14+
val fontSize: Int,
15+
val rotation: Int = 0
16+
)
56 KB
Loading
85.3 KB
Loading
90.4 KB
Loading
114 KB
Loading
556 KB
Loading

0 commit comments

Comments
 (0)