pub struct FormObject {
pub objects: Vec<PageObject>,
pub matrix: Affine,
pub bbox: Option<Rect>,
pub transparency: Transparency,
pub oc: Option<Arc<Dict>>,
pub source: Option<ObjRef>,
pub live_edit: bool,
}Expand description
A form XObject’s contents, already interpreted.
Fields§
§objects: Vec<PageObject>The objects the form produced.
matrix: AffineThe matrix taking the form’s space to the page’s.
bbox: Option<Rect>The form’s own bounding box, when it declared one. A missing
/BBox means no clip at all — the form is unbounded.
transparency: TransparencyThe form’s transparency group, when it declared one.
oc: Option<Arc<Dict>>The /OC entry from the form XObject’s own dictionary.
Like an image’s, this is where a form declares optional-content
membership, alongside and independently of any marked-content
sequence enclosing the Do that drew it.
source: Option<ObjRef>The XObject this form was drawn from, when it was a named resource.
As an image’s: the objects here are already interpreted, so a regenerated stream names the stream rather than re-emitting them.
live_edit: boolWhether this form is a live edit’s appearance — a field the user is currently typing in, rather than anything the file itself carries.
It is a fact about where the object came from, not an instruction to
a renderer, which is why a page crate can hold it: the file’s own
appearance streams and a form session’s regenerated ones are both
false, and only the appearance a session produces for the field it is
editing is true.
A renderer needs it because the oracle draws that one form differently from every other object on the page: the widget’s editor builds its own local render options with subpixel antialiasing forced on, which no page-level flag ever clears, so the text of a live edit — and no other text — is drawn that way. The distinction has to travel with the object because by the time anything rasterizes, this form is one entry in the page’s object list among all the others, and the whole page is rendered under a single set of options.
Defaults to false, so every existing producer keeps its meaning.
Trait Implementations§
Source§impl Clone for FormObject
impl Clone for FormObject
Source§fn clone(&self) -> FormObject
fn clone(&self) -> FormObject
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more