INNER CODE UNIT · Rust

parse

edwardkim/rhwp · crates/rhwp-ooxml-chart/src/lib.rs:432

    pub fn parse(xml: &[u8]) -> Option<Self> {
        parser::parse_chart_xml(xml)
    }

    /// 주어진 영역에 SVG 조각으로 렌더링한다.
    /// 반환값은 `<g>...</g>` 또는 여러 요소로 구성된 SVG 문자열 조각.
    pub fn render_svg(&self, x: f64, y: f64, w: f64, h: f64) -> String {
        renderer::render_chart_svg(self, x, y, w, h)
    }

    /// 호스트의 실제 글꼴 측정을 범례의 예약 폭과 배치에 공급한다.
    pub fn render_svg_with_text_measure(
        &self,
        bounds: [f64; 4],
        measure: &dyn Fn(&str, f64, &str) -> f64,
    ) -> String {
        let [x, y, w, h] = bounds;
        renderer::render_chart_svg_with_text_measure(self, x, y, w, h, measure)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…