fplotlib_scene module#

Owned frames and pages are the boundary between drawing and output. Capture a plot with fplotlib_draw:render_frame, obtain an equation with fplotlib_mathtext:math_frame, or record any drawing with a recording_renderer_t. Each produces the same frame_t, with local point coordinates, a baseline and ink bounds.

import_frame copies a child into the receiving frame’s arena and returns an owner-local handle. Repeated place calls share that copy. The original child does not need to remain alive. The affine matrix is [a,b,c,d,e,f]; an optional clip is in the child’s coordinates.

paged_document_t owns its pages and all captured drawing data. Built-in font data is shared read-only rather than copied into each document.

source_text() concatenates stored glyph-run source in drawing order. It includes raw TeX, so it is neither plain-text extraction nor an accessibility representation. Importing a frame does not place it; place controls each occurrence in the drawing order.

An invalid handle, size, transform or scope operation is a bug in the caller and stops the program with a message, like any other broken precondition of the rendering contract (see fplotlib_render and fplotlib_status). recording_renderer_t implements only the *_impl methods, so renderer_t checks every call it records.

fplotlib_scene (module)#

Variables

IDENTITY_MATRIXreal(kind=dp), parameter, dimension(6), Default = [1.0_dp, 0.0_dp, 0.0_dp, 1.0_dp, 0.0_dp, 0.0_dp]

Types

frame_t (type)#

frame_t (type)
Procedures:

paged_document_t (type)#

paged_document_t (type)
Procedures:

recording_renderer_t (type)#

recording_renderer_t (type)
Procedures:

Procedures

frame_text (function)#

function frame_text(self) -> text
Arguments:
selfclass(frame_t), intent(in)
Returns:
textcharacter(len=:), allocatable

document_page_count (function)#

function document_page_count(self) -> n
Arguments:
selfclass(paged_document_t), intent(in)
Returns:
ninteger

frame_init (subroutine)#

subroutine frame_init(self, width, height, baseline)
Arguments:
selfclass(frame_t), intent(inout)
widthreal(kind=dp), intent(in)
heightreal(kind=dp), intent(in)
baselinereal(kind=dp), intent(in), optional

frame_metrics (subroutine)#

subroutine frame_metrics(self, width, height, baseline, handle)
Arguments:
selfclass(frame_t), intent(in)
widthreal(kind=dp), intent(out)
heightreal(kind=dp), intent(out)
baselinereal(kind=dp), intent(out), optional
handleinteger, intent(in), optional

frame_set_baseline (subroutine)#

subroutine frame_set_baseline(self, baseline)
Arguments:
selfclass(frame_t), intent(inout)
baselinereal(kind=dp), intent(in)

frame_set_size (subroutine)#

subroutine frame_set_size(self, width, height)
Arguments:
selfclass(frame_t), intent(inout)
widthreal(kind=dp), intent(in)
heightreal(kind=dp), intent(in)

frame_ink_bounds (subroutine)#

subroutine frame_ink_bounds(self, bounds, has_ink)
Arguments:
selfclass(frame_t), intent(in)
boundsreal(kind=dp), intent(out), dimension(4)
has_inklogical, intent(out), optional

frame_import (subroutine)#

subroutine frame_import(self, child, handle)
Arguments:
selfclass(frame_t), intent(inout)
childtype(frame_t), intent(in)
handleinteger, intent(out)

frame_place (subroutine)#

subroutine frame_place(self, handle, matrix, clip)
Arguments:
selfclass(frame_t), intent(inout)
handleinteger, intent(in)
matrixreal(kind=dp), intent(in), optional, dimension(6)
cliptype(clip_t), intent(in), optional

frame_draw (subroutine)#

subroutine frame_draw(self, renderer, handle)
Arguments:
selfclass(frame_t), intent(in)
rendererclass(renderer_t), intent(inout)
handleinteger, intent(in), optional

record_open (subroutine)#

subroutine record_open(self, width, height, bg_rgb, bg_alpha, x0, y0)
Arguments:
selfclass(recording_renderer_t), intent(inout)
widthreal(kind=dp), intent(in)
heightreal(kind=dp), intent(in)
bg_rgbinteger, intent(in), optional, dimension(3)
bg_alphareal(kind=dp), intent(in), optional
x0real(kind=dp), intent(in), optional
y0real(kind=dp), intent(in), optional

record_close (subroutine)#

subroutine record_close(self)
Arguments:
selfclass(recording_renderer_t), intent(inout)

record_take (subroutine)#

subroutine record_take(self, frame)
Arguments:
selfclass(recording_renderer_t), intent(inout)
frametype(frame_t), intent(out)

record_path (subroutine)#

subroutine record_path(self, x, y, verbs, n_verb, paint)
Arguments:
selfclass(recording_renderer_t), intent(inout)
xreal(kind=dp), intent(in), dimension(:)
yreal(kind=dp), intent(in), dimension(:)
verbsinteger, intent(in), dimension(:)
n_verbinteger, intent(in)
painttype(paint_t), intent(in)

record_rect (subroutine)#

subroutine record_rect(self, x, y, w, h, paint, radius)
Arguments:
selfclass(recording_renderer_t), intent(inout)
xreal(kind=dp), intent(in)
yreal(kind=dp), intent(in)
wreal(kind=dp), intent(in)
hreal(kind=dp), intent(in)
painttype(paint_t), intent(in)
radiusreal(kind=dp), intent(in), optional

record_circle (subroutine)#

subroutine record_circle(self, cx, cy, r, paint)
Arguments:
selfclass(recording_renderer_t), intent(inout)
cxreal(kind=dp), intent(in)
cyreal(kind=dp), intent(in)
rreal(kind=dp), intent(in)
painttype(paint_t), intent(in)

record_markers (subroutine)#

subroutine record_markers(self, x, y, mx, my, mverbs, n_mverb, paint)
Arguments:
selfclass(recording_renderer_t), intent(inout)
xreal(kind=dp), intent(in), dimension(:)
yreal(kind=dp), intent(in), dimension(:)
mxreal(kind=dp), intent(in), dimension(:)
myreal(kind=dp), intent(in), dimension(:)
mverbsinteger, intent(in), dimension(:)
n_mverbinteger, intent(in)
painttype(paint_t), intent(in)

record_glyphs (subroutine)#

subroutine record_glyphs(self, x, y, run, paint, angle)
Arguments:
selfclass(recording_renderer_t), intent(inout)
xreal(kind=dp), intent(in)
yreal(kind=dp), intent(in)
runtype(glyphrun_t), intent(in)
painttype(paint_t), intent(in)
anglereal(kind=dp), intent(in)

record_image (subroutine)#

subroutine record_image(self, x, y, w, h, rgba, nx, ny, paint)
Arguments:
selfclass(recording_renderer_t), intent(inout)
xreal(kind=dp), intent(in)
yreal(kind=dp), intent(in)
wreal(kind=dp), intent(in)
hreal(kind=dp), intent(in)
rgbainteger, (:, :, :), intent(in), dimension(:,:,:)
nxinteger, intent(in)
nyinteger, intent(in)
painttype(paint_t), intent(in)

record_frame (subroutine)#

subroutine record_frame(self, matrix, clip)
Arguments:
selfclass(recording_renderer_t), intent(inout)
matrixreal(kind=dp), intent(in), dimension(6)
cliptype(clip_t), intent(in)

record_end_frame (subroutine)#

subroutine record_end_frame(self)
Arguments:
selfclass(recording_renderer_t), intent(inout)

record_group (subroutine)#

subroutine record_group(self, name)
Arguments:
selfclass(recording_renderer_t), intent(inout)
namecharacter(len=*), intent(in)

record_end_group (subroutine)#

subroutine record_end_group(self)
Arguments:
selfclass(recording_renderer_t), intent(inout)

document_clear (subroutine)#

subroutine document_clear(self)
Arguments:
selfclass(paged_document_t), intent(inout)

document_add_page (subroutine)#

subroutine document_add_page(self, page)
Arguments:
selfclass(paged_document_t), intent(inout)
pagetype(frame_t), intent(in)

document_page_size (subroutine)#

subroutine document_page_size(self, page, width, height)
Arguments:
selfclass(paged_document_t), intent(in)
pageinteger, intent(in)
widthreal(kind=dp), intent(out)
heightreal(kind=dp), intent(out)

document_draw_page (subroutine)#

subroutine document_draw_page(self, page, renderer)
Arguments:
selfclass(paged_document_t), intent(in)
pageinteger, intent(in)
rendererclass(renderer_t), intent(inout)

document_page_frame (subroutine)#

subroutine document_page_frame(self, page, frame)
Arguments:
selfclass(paged_document_t), intent(in)
pageinteger, intent(in)
frametype(frame_t), intent(out)