pub struct RegionTextExtractorFilter { /* private fields */ }Expand description
矩形框文本提取过滤器。
对应 Java: org.ofdrw.reader.extractor.RegionTextExtractorFilter
只提取指定矩形区域内的文本字符。Java 版对每个字符逐一判断 是否落在矩形框内(考虑 CTM 变换和 DeltaX/DeltaY 偏移), Rust 版基于文本对象的 Boundary 属性做简化判断。
Implementations§
Source§impl RegionTextExtractorFilter
impl RegionTextExtractorFilter
Sourcepub fn intersects(&self, text_boundary: &ST_Box) -> bool
pub fn intersects(&self, text_boundary: &ST_Box) -> bool
判断文本对象的 Boundary 是否与目标区域有交集。
简化实现:判断两个矩形是否有重叠区域。
Trait Implementations§
Source§impl Clone for RegionTextExtractorFilter
impl Clone for RegionTextExtractorFilter
Source§fn clone(&self) -> RegionTextExtractorFilter
fn clone(&self) -> RegionTextExtractorFilter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RegionTextExtractorFilter
impl RefUnwindSafe for RegionTextExtractorFilter
impl Send for RegionTextExtractorFilter
impl Sync for RegionTextExtractorFilter
impl Unpin for RegionTextExtractorFilter
impl UnsafeUnpin for RegionTextExtractorFilter
impl UnwindSafe for RegionTextExtractorFilter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more