Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[둘리] 뷰 챌린지 미션 2단계 제출합니다. #38

Merged
merged 28 commits into from
Oct 11, 2023

Conversation

hyemdooly
Copy link

@hyemdooly hyemdooly commented Oct 9, 2023

안녕하세요, 부나! 저번 미션보다 이번 미션의 코드가 더 보기 쉽지 않을까 싶네요.ㅎㅎ

필수 요구사항부터 선택 요구사항까지 모두 구현된 상태입니다. 완성된 앱 실행 화면은 위 이미지를 참고해주세요~

PaintChangingState 클래스 변경

Sealed Class로 할 이유가 없어 Enum Class로 변경했습니다.

ViewModel 함수 수정

setXXXSettingState를 모두 삭제하고 setSettingState로 통일했습니다. 인자로 어떤 세팅인지 값을 받아 처리합니다.

Brush 추가

Brush라는 Enum Class를 생성했습니다. 그리려는 그림이 어떤 그림인지 판단하기 위해 CanvasView에서 변수로 brush를 들고있어요.

CanvasView에서 Paint, Path 생성 코드 변경

copy이나 clone 메소드가 정의되어 있지 않아서 그동안 일일이 복사해줬던 것인데요!
알고보니 Paint와 Path에는 Paint(Paint paint)와 같은 copy constructor가 있다는 사실을 알았습니다.
그래서 Drawing 객체를 생성할 때 Path와 Paint를 복사하도록 수정했어요. 반면, CanvasView에서는 이제 설정이 바뀌거나 그림이 추가될 때 새 객체를 할당해주는 것이 아니라 가지고 있는 객체의 속성을 변경해주고 있습니다.

더 궁금한 점은 코멘트 해주세요! 감사합니다~!

@hyemdooly hyemdooly self-assigned this Oct 9, 2023
Copy link

@tmdgh1592 tmdgh1592 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안녕하세요 둘리!
미션하시느라 고생하셨습니다~
몇 가지 리뷰를 남겨놓았으니 확인부탁드립니다 : ) 👍🏻

@@ -0,0 +1,5 @@
package woowacourse.paint.canvas

enum class Brush {
Copy link

@tmdgh1592 tmdgh1592 Oct 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

개인적으로 Brush 라는 단어를 들었을 때 붓이 연상되는데요!
도형과 지우개는 브러시랑은 조금 거리가 있는 것처럼 느껴집니다.

스크린샷 2023-10-10 오전 12 57 22

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tool로 수정했습니다~

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이게 무슨 Tool 인지도 부가적인 설명이 있으면 좋겠네요~

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DrawingTool로 수정했습니다~

app/src/main/java/woowacourse/paint/canvas/Brush.kt Outdated Show resolved Hide resolved
app/src/main/java/woowacourse/paint/PaintChangingState.kt Outdated Show resolved Hide resolved
app/src/main/res/layout/activity_main.xml Outdated Show resolved Hide resolved
app/src/main/res/values/strings.xml Show resolved Hide resolved
app/src/main/java/woowacourse/paint/canvas/Drawing.kt Outdated Show resolved Hide resolved
app/src/main/java/woowacourse/paint/canvas/Drawing.kt Outdated Show resolved Hide resolved
app/src/main/java/woowacourse/paint/canvas/CanvasView.kt Outdated Show resolved Hide resolved
app/src/main/java/woowacourse/paint/canvas/CanvasView.kt Outdated Show resolved Hide resolved
Copy link

@tmdgh1592 tmdgh1592 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 반영하시느라 고생하셨습니다 둘리 👍
이전에 비해 역할 분리와 다형성을 잘 활용한 부분이 인상적이었습니다.
몇 가지 코멘트를 남겨두었으니 확인부탁드립니다. 😃

Copy link

@tmdgh1592 tmdgh1592 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰/요구사항 반영하시느라 고생하셨습니다!
작성하신 코드에 대해 모두 이유와 근거가 있으신 것 같아 좋았습니다.
3단계 때 봅시다잉! 🙌

@tmdgh1592 tmdgh1592 merged commit 38b960c into woowacourse:hyemdooly Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants