Skip to content

fix(picture): write a picture's border before its image rectangle - #446

Merged
airmang merged 2 commits into
mainfrom
fix/picture-border-before-image-rect
Oct 8, 2026
Merged

airmang merged 2 commits into
mainfrom
fix/picture-border-before-image-rect

Conversation

@airmang

@airmang airmang commented Oct 8, 2026

Copy link
Copy Markdown
Owner

바뀐 점

#445(그림 효과·테두리)의 후속이다.

  • 테두리 자리: add_picture가 쓰는 테두리 hp:lineShape를 hp:imgRect 바로 앞에 둔다. 스키마의 PictureType이 그 순서이고, 한/글 그림도 두 가지 자식 순서(hc:img가 앞인 것, 뒤인 것) 모두 lineShape 바로 뒤에 imgRect가 온다. 전에는 hc:img 뒤(… imgDim, img, lineShape, effects)에 두었는데, 그런 순서는 한/글 그림에 없다. 한/글은 두 자리 모두 같게 그리고, 저장할 때 자기 순서로 다시 쓴다.
  • 테두리 굵기 검사: line_width를 line_color 없이 줘도 검사한다. 전에는 색이 없으면 잘못된 굵기(예: -1)를 말없이 버렸다. 이제 shape-picture-border-value로 거부한다. 문단 수준과 문서 수준 둘 다 같다.
  • README·README_EN "알려진 제약": 그림 항목의 "효과 미지원"을 고친다. 밝기·대비·회색조·흑백·투명도와 실선 테두리는 add_picture() 인자로 줄 수 있고, 그림자·반사 같은 효과와 자르기·회전은 아직 지원하지 않는다고 적는다. 예제 원장의 두 README 해시(manualSha256)도 바꾼다.

테스트

tests/test_picture_adjustments.py:

  • 테두리가 imgRect 바로 앞에 있는지 본다(전에는 img 바로 뒤를 봤다).
  • line_width=-1을 색 없이 주면 거부되고, 문단과 이진 항목이 늘지 않는다.

🤖 Generated with Claude Code

airmang and others added 2 commits October 8, 2026 21:40
The schema's PictureType has hp:lineShape right before hp:imgRect, and so
do Hancom's pictures in either of their two child orders; the border went
after hc:img, where none has it (Hancom drew it and saved it back in its
place all the same). A bad line_width is now refused without a
line_color too, not dropped quietly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mits

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@airmang

airmang commented Oct 8, 2026

Copy link
Copy Markdown
Owner Author

리뷰 결과: 병합합니다.

  • 새 그림의 자식 순서가 renderingInfo, lineShape, imgRect, imgClip, inMargin, imgDim, img, effects입니다. 스키마의 PictureType과 같은 순서로 쓰인 한/글 저장본과 같습니다.
  • line_width는 line_color 없이도 검사합니다. 문서 수준 add_picture에서 거부되면 이진 항목도 패키지에 남지 않습니다.
  • README 두 벌의 그림 항목이 지원 범위(밝기·대비·회색조·흑백·투명도·실선 테두리)와 미지원(그림자·반사·자르기·회전)을 나누어 적고, 예제 원장의 두 해시가 커밋된 내용과 같습니다.

@airmang
airmang merged commit 62ba003 into main Oct 8, 2026
13 checks passed
@airmang
airmang deleted the fix/picture-border-before-image-rect branch October 8, 2026 13:18
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.

1 participant