Skip to content

그림(Picture) 회전·뒤집기(flip) 속성이 SVG 렌더링에 적용되지 않음 #519

@planet6897

Description

@planet6897

증상

samples/exam_eng.hwp 4페이지 28번 문제 안내문 박스의 종이-말림(curl) 데코레이션 그림이 PDF에서는 박스 왼쪽 상단에 보이지만, rhwp의 SVG 출력에서는 잘못된 위치(원본 그대로 오른쪽 하단)로 렌더링되어 본문과 겹쳐 보이지 않음.

원인

src/renderer/layout/picture_footnote.rs 의 두 ImageNode 생성 지점(line 107-117, 316-326)에서 transform 필드를 채우지 않고 ShapeTransform::default() 를 사용함. HWP에 저장된 picture.shape_attr.horz_flip / vert_flip / rotation_angle 값이 <g transform=\"...\"> 래퍼 생성 단계(svg.rs:565 open_shape_transform)로 전달되지 않음.

해당 그림의 실제 속성:

[s0 p189 c1] bin_id=2 flip=(h=true,v=true) rot=0
M=[-0.976,0.000,30614; 0.000,-0.881,30190]

같은 페이지 27번(bin_id=3)은 flip 없음 → 정상 렌더. Rectangle/Line/Ellipse 등 다른 도형은 open_shape_transform이 동작하지만 Picture만 누락.

영향 범위

  • 회전·뒤집기가 적용된 모든 Picture 컨트롤이 잘못 렌더됨
  • 회귀 테스트 케이스: samples/exam_eng.hwp 4페이지 28번

수정 방향

ImageNode 생성 시 transform 필드를 picture.shape_attr 의 flip/rotation 값으로 채움. rotation_angle 단위 변환(HWP 스펙: 1/100° 추정) 확인 필요.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions