-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
There was a problem hiding this 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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tool로 수정했습니다~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이게 무슨 Tool
인지도 부가적인 설명이 있으면 좋겠네요~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DrawingTool로 수정했습니다~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰 반영하시느라 고생하셨습니다 둘리 👍
이전에 비해 역할 분리와 다형성을 잘 활용한 부분이 인상적이었습니다.
몇 가지 코멘트를 남겨두었으니 확인부탁드립니다. 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
리뷰/요구사항 반영하시느라 고생하셨습니다!
작성하신 코드에 대해 모두 이유와 근거가 있으신 것 같아 좋았습니다.
3단계 때 봅시다잉! 🙌
안녕하세요, 부나! 저번 미션보다 이번 미션의 코드가 더 보기 쉽지 않을까 싶네요.ㅎㅎ
필수 요구사항부터 선택 요구사항까지 모두 구현된 상태입니다. 완성된 앱 실행 화면은 위 이미지를 참고해주세요~
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에서는 이제 설정이 바뀌거나 그림이 추가될 때 새 객체를 할당해주는 것이 아니라 가지고 있는 객체의 속성을 변경해주고 있습니다.
더 궁금한 점은 코멘트 해주세요! 감사합니다~!