Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
티켓팅 안내 이미지를 단순 회전 시키면 이미지가 렌더링 되어지는 가로 크기에 따라서
가로 스크롤
이 생기고, 양 끝에하얀색 여백
이 생겨지는 문제 존재하였음이 부분을 캔버스 렌더링 방식과 비율에 따른 자동 스케일링, 반응형 좌표 이동을 개발하여 해결함
위 그림의 경우 회전하면 회전 각에 따라 양 끝점의 좌표가 y = ax + b 에 의해 대략적으로 예측 되어짐
예를들어 대략 3도 정도 기울였을시
cos(3° * Math.PI / 180)
로 x,sin(3° * Math.PI / 180)
로 y 값이(0.999, 0.0519)
로 구해지면원점을 지나는 일차 함수의 기울기를 구할 수 있음
이를 이용하여 이미지가 렌더링 되어질 전체 높이 크기를 구한 다음
![스크린샷 2021-06-15 오후 10 47 16](https://user-images.githubusercontent.com/16532326/122063945-ac073080-ce2b-11eb-97d1-2477c47cab9a.png)
그려질 캔버스 높이 크기와 비율을 계산하여 축소시킨 이미지로 렌더링 함
물론 브라우저 크기 변화에 따라 다시 렌더링해야 할 경우엔 이벤트 리스너 등록시켜서 렌더링 호출 시킴