Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::canvas::BidiAnalyzer Class Reference

#include <bidi.hpp>

Static Public Member Functions

static BidiParagraph analyze (std::string_view text, BidiBaseDirection base_direction=BidiBaseDirection::Auto)
 Analyze one paragraph of UTF-8 text.
static std::vector< BidiRun > visual_order (const std::vector< BidiRun > &runs)
 Re-order runs (in logical order, as returned by analyze) into visual / paint order via UBA rules L1-L2.
static bool has_sheenbidi () noexcept
 True when the build links SheenBidi.

Member Function Documentation

◆ analyze()

BidiParagraph pulp::canvas::BidiAnalyzer::analyze ( std::string_view text,
BidiBaseDirection base_direction = BidiBaseDirection::Auto )
static

Analyze one paragraph of UTF-8 text.

base_direction selects the paragraph level (Auto = UBA rule P2). Always returns a non-empty runs vector when text is non-empty.

◆ has_sheenbidi()

bool pulp::canvas::BidiAnalyzer::has_sheenbidi ( )
staticnoexcept

True when the build links SheenBidi.

Tests that need the real engine (vs the pass-through stub) gate themselves on this.

◆ visual_order()

std::vector< BidiRun > pulp::canvas::BidiAnalyzer::visual_order ( const std::vector< BidiRun > & runs)
static

Re-order runs (in logical order, as returned by analyze) into visual / paint order via UBA rules L1-L2.

The implementation is a simplified L2 reverse-on-odd-level pass — sufficient for single-line label paint. TextEditor's multi-line wrap path stays on the SkShaper / ICU iterator route in text_run_planner.cpp.


The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/canvas/include/pulp/canvas/bidi.hpp