rpdfium-doc 7676.6.2

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

//! Line — a laid-out line of text within a section (`CPVT_Line`).
//!
//! Stores the word range and positional metrics for one wrapped line.

/// A laid-out line of text within a section.
///
/// Corresponds to upstream `CPVT_Line`.
#[derive(Debug, Clone)]
pub struct Line {
    /// Index of the first word in this line within the section's words.
    pub word_start: usize,
    /// Number of words in this line.
    pub word_count: usize,
    /// X offset of the line (after alignment).
    pub x: f32,
    /// Y position of the line baseline.
    pub y: f32,
    /// Width of the text content on this line.
    pub width: f32,
    /// Ascent of the tallest character on this line.
    pub ascent: f32,
    /// Descent of the deepest character on this line.
    pub descent: f32,
}