Repository navigation
feat(picture): give a new picture a soft edge or a reflection - #451
Merged
Merged
Conversation
add_picture takes soft_edge (HWPUNIT) for hp:softEdge and reflection=PictureReflection(size, distance, alpha_start, alpha_end, blur) for hp:reflection below the picture, written in the schema's order after the shadow and the glow, as a Hancom document holds them. A size outside 0 (exclusive) to 1, a negative length or an alpha past 0..1 is refused before anything is added (shape-picture-effect-value). PictureReflection joins hwpx.oxml (136 -> 137 names). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
리뷰 결과: 막을 것은 없습니다. CI가 통과하면 병합합니다.
|
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.
바뀐 점
#448(그림자·빛남)에 이어, 그림을 만들 때 부드러운 가장자리와 반사를 줄 수 있다.
soft_edgehp:effects/hp:softEdge/@radiusreflection=PictureReflection(...)hp:effects/hp:reflectionPictureReflection필드(기본값)size(0.5)hp:pos/@enddistance(0)@distancealpha_start(0.5),alpha_end(0.997)hp:alpha/@start,@endblur(50)@radius나머지 속성은 한/글 문서가 쓰는 값으로 고정한다.
alignStyle="BOTTOM_LEFT",direction="90",fadeDirection="90",rotationStyle="0"skew0 0,scale1 -1,pos/@start0hp:effects안의 순서는 스키마대로 그림자, 빛남, 부드러운 가장자리, 반사다.한/글의 동작
shape-picture-effect-value로 거부한다.코드
oxml/shape_position.pyPictureReflection을 더한다.validate_picture_effects와append_picture_effects가soft_edge·reflection을 받는다. 기본값은None이라 이전 호출은 그대로 동작한다.oxml/objects.py,_document/media.py,document.py:add_picture가 같은 인자를 받는다.oxml/__init__.py:PictureReflection을 내보낸다(hwpx.oxml.__all__136 → 137).errors.py·docs/error-codes.md:shape-picture-effect-value설명에 부드러운 가장자리·반사를 더한다.docs/coverage-ledger.*재생성:hp:softEdge·hp:reflection·hp:alpha를 코드가 쓴다.docs/support-matrix.md(동봉본),README.md·README_EN.md(알려진 제약, 예제 원장 해시), 변경 로그,tests/data/document_facade_surface.json.테스트
tests/test_picture_adjustments.py:picture_all_effects.hwpx(그림자·빛남·부드러운 가장자리 300·반사 기본값)의hp:effects아래 요소·속성과 같게 쓰는지 본다. 순서도 본다.🤖 Generated with Claude Code