Skip to content

docs: describe add_picture's sizing, adjustments, crop and effects - #455

Merged
airmang merged 1 commit into
mainfrom
docs/add-picture-in-the-api-reference
Oct 11, 2026
Merged

airmang merged 1 commit into
mainfrom
docs/add-picture-in-the-api-reference

Conversation

@airmang

@airmang airmang commented Oct 10, 2026

Copy link
Copy Markdown
Owner

바뀐 점

docs/api_reference.md의 HwpxDocument 콘텐츠 생성 헬퍼에 add_picture 항목이 없었다. #445·#446·#447·#448·#451에서 더한 인자를 포함해 설명을 더한다.

  • 크기: width·height(HWPUNIT) 또는 width_mm·height_mm. 너비를 빼면 14400이다. 높이를 빼면 PNG는 가로세로 비율을, 다른 형식은 너비와 같은 높이를 쓴다. align은 그림을 둔 단락의 정렬이다.
  • 이미지 조정: brightness·contrast(-100100), effect(REAL_PIC·GRAY_SCALE·BLACK_WHITE), alpha(0255).
  • 테두리: line_color·line_width.
  • 자르기: crop(네 변, HWPUNIT, 축척 유지).
  • 효과: shadow·glow·soft_edge·reflection. 바깥 효과만큼 자리를 차지한다.
  • 거부 코드: shape-picture-image-value·-border-value·-crop-value·-effect-value·style-color-invalid.
  • 문단 수준 HwpxOxmlParagraph.add_picture도 같은 인자를 받는다. 뒤집기·회전은 미지원이다.

글만 더하고 코드 블록은 넣지 않았다(예제 원장은 그대로).

테스트

  • 적은 인자 이름과 순서는 inspect.signature(HwpxDocument.add_picture)와 대조했다.
  • tests/test_documentation_code_fences.py, tests/test_contract_docs_sync.py가 통과한다. 남는 실패 하나(설치된 wheel 예제 실행)는 이 PC 환경의 기존 실패다.
  • 문서만 바꿨다. 이 PC의 하드웨어 점검 기간이라 전체 시험은 이 PC에서 돌리지 않았다. 전체 시험은 CI가 돌린다.

🤖 Generated with Claude Code

The API reference listed no add_picture entry. Describe its size
arguments, the image adjustments and border, crop, the shadow, glow, soft
edge and reflection effects and the room they take, and the error codes
values Hancom does not draw are refused with.

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

airmang commented Oct 11, 2026

Copy link
Copy Markdown
Owner Author

리뷰 결과: 병합합니다. 문서의 add_picture 인자(크기·조정·테두리·자르기·효과)와 PictureShadow·PictureGlow·PictureReflection의 필드·기본값이 실제 서명과 같습니다.

@airmang
airmang merged commit eeac2b3 into main Oct 11, 2026
13 checks passed
@airmang
airmang deleted the docs/add-picture-in-the-api-reference branch October 11, 2026 06:57
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