feat: 페이지 여백 + 상류 PR #50·#52 백포트 - #53
Merged
Merged
Conversation
- 페이지 여백을 mm 단위 네 변의 문서 설정으로(PageMargins, RichEditor.PageMargin, PageSetup.Margin), JSON·.flow 저장(기본값은 생략), 쓸 수 없는 여백은 거부. 기본 15 mm. - RTF가 용지와 여백을 읽고 쓴다(문서·구역 수준 모두) — 이 포트의 RTF는 용지조차 다루지 않았다. - 툴바 5단계 여백 픽커, 얇은 여백 띠에서 머리글·바닥글·쪽 번호 생략. - 표·그림·구분선 위 자동 한 줄 간격(Block.AutoTopMargin=NaN)과 여백 메뉴 "자동(한 줄)". - 표 바깥 테두리를 반 펜 안쪽으로(인쇄 경로 실측 34% → 온전, 반증: 되돌리면 50%). - 그림·최상위 표의 선택 테두리를 바깥으로 빼고 쪽 내용 클립 뒤에 그린다 — 왼쪽 여백 0인 표의 선택 테두리 왼쪽 선이 안 보이던 것(실기 보고, 포트 전용)도 함께. - 쪽 여백은 DIP로 바꿀 때 정수 반올림(최대 0.13 mm): 소수점 픽셀의 안티앨리어싱 클립이 가장자리 선을 흐렸다. 공개 API 추가만. 테스트 862 → 887, 문서 퍼즈 2000시드 통과. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
요약
상류 AvaloniaRichEditor의 PR #50(페이지 여백)과 PR #52(여백 실기 후속)를 옮겼습니다. 상류의 최종 상태(mm 단위)를 기준으로 했습니다. 공개 API는 추가만 있습니다.
내용
PageMargins(mm 단위 네 변),RichEditor.PageMargin,PageSetup.Margin/DefaultMargin을 추가했습니다..flow에 저장하고, 기본값이면 필드를 생략합니다.Block.AutoTopMargin(NaN)으로 한 줄 간격을 둡니다. 우클릭 여백 메뉴에는 "자동(한 줄)" 항목을 넣었습니다.상류와 다른 점
쪽 여백을 DIP로 바꿀 때 정수로 반올림합니다(최대 0.13 mm, 파일에는 정확한 mm 값을 저장). 15 mm = 56.69 DIP라서 Win2D의 안티앨리어싱 클립이 소수점 픽셀에 걸려 가장자리 선이 흐려지는 것을 실측했습니다. 반올림한 값을 모든 좌표 계산이 함께 쓰므로 서로 어긋나지 않습니다.
검증
RICHEDITOR_FUZZ_SEEDS=2000통과PageMarginTests(12건)를 옮기고, 툴바 픽커·여백 메뉴 "자동"·표 테두리 픽셀 테스트를 추가했습니다.🤖 Generated with Claude Code