diff --git a/src/renderer/layout.rs b/src/renderer/layout.rs index c6280703..4d9d2119 100644 --- a/src/renderer/layout.rs +++ b/src/renderer/layout.rs @@ -2856,6 +2856,7 @@ impl LayoutEngine { effect: pic.image_attr.effect, brightness: pic.image_attr.brightness, contrast: pic.image_attr.contrast, + transform: utils::extract_shape_transform(&pic.shape_attr), ..ImageNode::new(bin_data_id, image_data) }), BoundingBox::new(pic_x, pic_y, pic_w, pic_h), diff --git a/src/renderer/layout/paragraph_layout.rs b/src/renderer/layout/paragraph_layout.rs index 681e3a97..3879afbb 100644 --- a/src/renderer/layout/paragraph_layout.rs +++ b/src/renderer/layout/paragraph_layout.rs @@ -13,7 +13,7 @@ use super::super::{TextStyle, ShapeStyle, TabStop, hwpunit_to_px, px_to_hwpunit, use super::{LayoutEngine, CellContext}; use super::text_measurement::{resolved_to_text_style, estimate_text_width, compute_char_positions, extract_tab_leaders_with_extended, find_next_tab_stop}; use super::border_rendering::create_border_line_nodes; -use super::utils::{resolve_numbering_id, expand_numbering_format, numbering_format_to_number_format, find_bin_data}; +use super::utils::{resolve_numbering_id, expand_numbering_format, numbering_format_to_number_format, find_bin_data, extract_shape_transform}; /// lineseg baseline_distance를 폰트 어센트 기준으로 보정한다. /// CENTER 문단 수직정렬 등으로 baseline이 50% 이하로 설정된 경우, @@ -1830,6 +1830,7 @@ impl LayoutEngine { brightness: pic.image_attr.brightness, contrast: pic.image_attr.contrast, text_wrap: Some(pic.common.text_wrap), + transform: extract_shape_transform(&pic.shape_attr), ..ImageNode::new(bin_data_id, image_data) }), BoundingBox::new(x, img_y, tac_w, pic_h), @@ -2104,6 +2105,7 @@ impl LayoutEngine { brightness: pic.image_attr.brightness, contrast: pic.image_attr.contrast, text_wrap: Some(pic.common.text_wrap), + transform: extract_shape_transform(&pic.shape_attr), ..ImageNode::new(bin_data_id, image_data) }), BoundingBox::new(x, img_y, tac_w, pic_h), @@ -2214,6 +2216,7 @@ impl LayoutEngine { brightness: pic.image_attr.brightness, contrast: pic.image_attr.contrast, text_wrap: Some(pic.common.text_wrap), + transform: extract_shape_transform(&pic.shape_attr), ..ImageNode::new(bin_data_id, image_data) }), BoundingBox::new(img_x, img_y, tac_w, pic_h), diff --git a/src/renderer/layout/picture_footnote.rs b/src/renderer/layout/picture_footnote.rs index b5cf86f2..9a64cf4a 100644 --- a/src/renderer/layout/picture_footnote.rs +++ b/src/renderer/layout/picture_footnote.rs @@ -14,7 +14,7 @@ use super::super::style_resolver::ResolvedStyleSet; use super::super::{hwpunit_to_px, StrokeDash, LineStyle, TextStyle, AutoNumberCounter, format_number, NumberFormat as NumFmt}; use super::LayoutEngine; use super::border_rendering::border_width_to_px; -use super::utils::find_bin_data; +use super::utils::{extract_shape_transform, find_bin_data}; use super::text_measurement::{resolved_to_text_style, estimate_text_width}; impl LayoutEngine { @@ -114,6 +114,7 @@ impl LayoutEngine { brightness: picture.image_attr.brightness, contrast: picture.image_attr.contrast, text_wrap: Some(picture.common.text_wrap), + transform: extract_shape_transform(&picture.shape_attr), ..ImageNode::new(bin_data_id, image_data) }), BoundingBox::new(pic_x, pic_y, pic_width, pic_height), @@ -324,6 +325,7 @@ impl LayoutEngine { brightness: picture.image_attr.brightness, contrast: picture.image_attr.contrast, text_wrap: Some(picture.common.text_wrap), + transform: extract_shape_transform(&picture.shape_attr), ..ImageNode::new(bin_data_id, image_data) }), BoundingBox::new(adjusted_pic_x, pic_y, pic_width, pic_height), diff --git a/src/renderer/layout/table_cell_content.rs b/src/renderer/layout/table_cell_content.rs index 4ab28704..7e705f27 100644 --- a/src/renderer/layout/table_cell_content.rs +++ b/src/renderer/layout/table_cell_content.rs @@ -13,7 +13,7 @@ use super::super::{hwpunit_to_px, TextStyle, ShapeStyle}; use super::{LayoutEngine, CellContext, CellPathEntry}; use super::border_rendering::{build_row_col_x, collect_cell_borders, render_edge_borders, render_transparent_borders}; use super::text_measurement::{resolved_to_text_style, is_cjk_char, is_vertical_rotate_char, vertical_substitute_char}; -use super::utils::find_bin_data; +use super::utils::{extract_shape_transform, find_bin_data}; impl LayoutEngine { /// 세로쓰기 셀의 텍스트를 수직 방향으로 배치한다. @@ -641,7 +641,7 @@ impl LayoutEngine { control_index: Some(ctrl_idx), fill_mode: None, original_size: None, - transform: ShapeTransform::default(), + transform: extract_shape_transform(&pic.shape_attr), crop: None, original_size_hu: None, effect: pic.image_attr.effect,