On this page:
Paged  DC
Paged  DC.start
Paged  DC.end
Paged  DC.start_  doc
Paged  DC.end_  doc
Paged  DC.start_  page
Paged  DC.end_  page
PDFDC
PSDC
SVGDC
Paper  Size
Paper  Size.paper
0.45+9.0.0.11

4.3 Paged Drawing Contexts🔗ℹ

interface

interface draw.PagedDC

Drawing contexts that output to a file format, drawing must be explicitly started with PagedDC.start and ended with PagedDC.end.

method

method (dc :: PagedDC).start(message :: String = "Printing")

  :: Void

 

method

method (dc :: PagedDC).end() :: Void

 

method

method (dc :: PagedDC).start_doc(message :: String = "Printing")

  :: Void

 

method

method (dc :: PagedDC).end_doc() :: Void

 

method

method (dc :: PagedDC).start_page() :: Void

 

method

method (dc :: PagedDC).end_page() :: Void

Use PagedDC.start and PagedDC.end to bound all drawing for single-page output.

Use the more fine-grained combination of PagedDC.start_doc and PagedDC.start_page for multi-page output, where PagedDC.end_page ends a page and then PagedDC.start_page can be used again to start the next page. After the last page’s PagedDC.end_page, use PagedDC.end_doc to finish the document.

class

class draw.PDFDC():

  implements PagedDC

  constructor (

    size :: PaperSize,

    ~output: output :: Path || Port.Output

  )

Creates a drawing context that produces PDF output. Be sure to use PagedDC.start and PagedDC.end around all drawing.

class

class draw.PSDC():

  implements PagedDC

  constructor (

    size :: PaperSize,

    ~output: output :: Path || Port.Output,

    ~as_eps: as_eps = #true

  )

Creates a drawing context that produces PostScript output. Be sure to use PagedDC.start and PagedDC.end around all drawing.

class

class draw.SVGDC():

  implements PagedDC

  constructor (

    size :: SizeLike,

    ~output: output :: Path || Port.Output

  )

Creates a drawing context that produces SVG output. Be sure to use PagedDC.start and PagedDC.end around all drawing.

enumeration

enum PaperSize

| ~is_a SizeLike

| paper

A size specification to be used with PSDC and PDFDC, which allows #'paper to specify the size indirectly as the current paper configuration’s size.