Skip to content

Commit

Permalink
Change appearance to normal_appearance for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
awehrfritz committed Feb 11, 2024
1 parent ee99ce9 commit 38ffdb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fn main() -> std::io::Result<()> {
annotation.subtype(AnnotationType::Screen);
annotation.rect(bbox);
annotation.page(page_id);
annotation.appearance(form_xobject_id);
annotation.normal_appearance(form_xobject_id);

// Write a rendition action for the screen annotation.
let mut action = annotation.action();
Expand Down
10 changes: 5 additions & 5 deletions src/annotations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ impl<'a> Annotation<'a> {
self
}

/// Write the `/AP` dictionary to provide the visual appearance for a screen
/// annotation. For now, this sets only the normal appearance as a reference
/// to a [`FormXObject`]. Only permissible for the subtype `Screen`.
/// PDF 1.5+.
pub fn appearance(&mut self, id: Ref) -> &mut Self {
/// Write the `/N` attribute inside the `/AP` dictionary to provide the
/// visual appearance for a screen annotation. For now, this sets only the
/// normal appearance as a reference to a [`FormXObject`]. Only permissible
/// for the subtype `Screen`. PDF 1.5+.
pub fn normal_appearance(&mut self, id: Ref) -> &mut Self {
self.insert(Name(b"AP")).dict()
.pair(Name(b"N"), id);
self
Expand Down

0 comments on commit 38ffdb0

Please sign in to comment.