You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7ade4c1
Browse filesBrowse the repository at this point in the historyBrowse files
A plot could only be drawn straight into an encoder, so nothing could
hold a finished drawing, place it inside another or put several on pages.
* renderer_t gains begin_frame(matrix, clip) and end_frame, which scope
an affine transform and a rectangular clip. SVG, PDF and EPS write
them as a group with a transform, cm and concat; the PNG rasterizer
applies the matrix to the outlines before filling and clips them to
the frame rectangles. A target that cannot transform stops on a
transformed frame instead of ignoring it.
* fplotlib_scene has frame_t, an owned recording of drawing calls with
a size, a baseline and ink bounds; import_frame copies a child into a
frame once and place draws it, transformed and clipped, as often as
wanted. recording_renderer_t records any drawing into a frame, and
paged_document_t holds pages of frames, of any sizes. Frames own their
data: the inputs, and an imported child, may change or go away.
* fplotlib_draw:render_frame captures the current figure as a frame,
and fplotlib_mathtext:math_frame a formula.
* fplotlib_document exports a paged document to bytes in memory, one
PDF or one SVG, PNG or EPS per page, or saves it to files. Only
save_document returns a status, for the file writes. The PDF backend
writes several pages (new_page), sharing their fonts, images and
transparency states, and keeps any number of images.
* A glyph run keeps the font of every glyph, its logical UTF-8 text and
the byte range each glyph came from; text_layout fills them in, and a
formula maps its glyphs to its TeX source. PDF text carries its source
as ActualText; a formula's TeX is not used as ActualText.
* EPS images are clipped like everything else, and the backends reset
their state when a canvas is opened again.
Invalid handles, sizes, transforms and unbalanced frames break the
rendering contract and stop with a message, like the other checks in
fplotlib_render_checks.
The PNG and SVG test pictures are unchanged; the PDFs gain ActualText
and the EPS files of images their clip. tests/test_frames.f90 checks
that frames own what they record, the source mapping, and a captured
plot replayed after clf; tests/test_frame_backends.f90 checks PDF
resources and pages, text, and transformed and clipped frames in PNG.
0 commit comments