Canvas

[Raku PDF Project] / [PDF-Content Module] / PDF::Content :: Canvas

A graphical content container such as a page, xobject form, or pattern

this role is applied to PDF::Content::Page and PDF::Content::XObject['Form'].

method gfx

method gfx(
    *%o
) returns PDF::Content

appended graphics return appended PDF content stream

method pre-gfx

method pre-gfx() returns PDF::Content

return prepended graphics

method next-mcid

method next-mcid() returns UInt:D

Allocate the next MCID (Marked Content Identifier)

method contents

method contents() returns Str

return contents

method contents-parse

method contents-parse() returns List

reparse contents

method render

method render(
    Bool :$tidy = Bool::True,
    *%o
) returns PDF::Content

render graphics

method finish

method finish() returns Mu

finish for serialization purposes

method xobject-form

method xobject-form(
    :$group = Bool::True,
    *%dict
) returns PDF::Content::XObject

create a child XObject Form

method tiling-pattern

method tiling-pattern(
    List :$BBox!,
    Numeric :$XStep = Code.new,
    Numeric :$YStep = Code.new,
    Int :$PaintType = 1,
    Int :$TilingType = 1,
    Hash :$Resources = Code.new,
    *%dict
) returns PDF::Content::XObject

create a new Type 1 (Tiling) Pattern

method save-as-image

method save-as-image(
    Str $outfile where { ... },
    |c
) returns Mu

draft rendering via Cairo (experimental)

The PDF::To::Cairo module must be installed to use this method

has PDF::Content::Canvas::TagSetBuilder $.tags

snapshot of previous, and currently open tags

PDF::Content v0.9.11

PDF content related classes; including text, images, fonts and graphics

Authors

  • David Warring

License

Artistic-2.0

Dependencies

Base64::NativeColorCompress::Zlib::RawFont::AFM:ver<1.24.10+>Native::PackingMethod::AlsoJSON::FastPDF:ver<0.6.8+>PDF::Grammar:ver<0.3.2+>

Test Dependencies

Provides

  • PDF::Content
  • PDF::Content::API
  • PDF::Content::Canvas
  • PDF::Content::Color
  • PDF::Content::Font
  • PDF::Content::Font::CoreFont
  • PDF::Content::Font::Enc::Glyphic
  • PDF::Content::Font::Enc::Type1
  • PDF::Content::Font::Encoder
  • PDF::Content::Font::Encodings
  • PDF::Content::FontObj
  • PDF::Content::Image
  • PDF::Content::Image::GIF
  • PDF::Content::Image::JPEG
  • PDF::Content::Image::PDF
  • PDF::Content::Image::PNG
  • PDF::Content::Interface
  • PDF::Content::Matrix
  • PDF::Content::Ops
  • PDF::Content::Page
  • PDF::Content::PageNode
  • PDF::Content::PageTree
  • PDF::Content::ResourceDict
  • PDF::Content::Resourced
  • PDF::Content::Tag
  • PDF::Content::Text::Block
  • PDF::Content::Text::Box
  • PDF::Content::Text::Line
  • PDF::Content::Text::Style
  • PDF::Content::XObject
  • X::PDF::Content

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.