rpdfium-doc 7676.6.4

Document-level features for rpdfium
Documentation
// Derived from PDFium's cpvt_section.h
// Original: Copyright 2014 The PDFium Authors
// Licensed under BSD-3-Clause / Apache-2.0
// See pdfium-upstream/LICENSE for the original license.

//! Section — a paragraph of laid-out text (`CPVT_Section`).
//!
//! A section is a run of text delimited by paragraph breaks. Each section
//! holds its words (characters) and the lines produced by word-wrap.

use super::vt_line::Line;
use super::vt_word_info::WordInfo;

/// A section of text (separated by paragraph breaks).
///
/// Corresponds to upstream `CPVT_Section`.
#[derive(Debug, Clone)]
pub struct Section {
    /// Characters in this section.
    pub words: Vec<WordInfo>,
    /// Lines after layout.
    pub lines: Vec<Line>,
    /// Bounding rect [left, bottom, right, top] of this section.
    pub rect: [f32; 4],
}