vibesketch.render.vector¶
EPS and EMF figures for office documents, from the publication SVG (#96).
Word processors and slide programs take EMF (Windows Enhanced Metafile) and EPS as editable vector pictures. Both are written here from the same scene SVG the other formats come from, so a figure looks the same in every format: the SVG is reduced to filled and stroked paths, the text outlined from the bundled Roboto face (so no font is needed where the file is opened), and the paths written in each format. No converter or font is taken from the system.
Formats:
EPS: Adobe “Encapsulated PostScript File Format Specification” 3.0 and the PostScript Language Reference, 3rd ed.; one point is one PostScript unit.
EMF: Microsoft “[MS-EMF]: Enhanced Metafile Format”, records EMR_HEADER, EMR_EXTCREATEPEN, EMR_CREATEBRUSHINDIRECT, EMR_SELECTOBJECT, the path records and EMR_EOF; coordinates in twentieths of a point (a 1440 dpi reference device) and the frame in hundredths of a millimetre.
SVG elliptical arcs follow the SVG 1.1 implementation notes, appendix F.6, and are approximated by cubic Béziers of at most a quarter turn.
Module Attributes
|
("M", p), ("L", p), ("C", c1, c2, p) or ("Z",). |
Functions
|
The figure as an Enhanced Metafile, text outlined, at its physical size. |
|
The figure as Encapsulated PostScript, text outlined, at its physical size. |
|
The figure's paths in drawing order, and its box (left, top, width, height) in points. |
Classes
|
One path, filled and/or stroked, in figure points with y down. |
- class vibesketch.render.vector.Paint(ops, fill, stroke, width=1.0, evenodd=False, cap='butt', join='miter')[source]¶
Bases:
objectOne path, filled and/or stroked, in figure points with y down.
- Parameters:
- vibesketch.render.vector.eps(svg)[source]¶
The figure as Encapsulated PostScript, text outlined, at its physical size.