Sets the way text draws to the Py5Graphics drawing surface, either as texture maps or as vector geometry.
Sets the way text draws to the Py5Graphics drawing surface, either as texture maps or as vector geometry. The default
text_mode(MODEL), uses textures to render the fonts. The
text_mode(SHAPE) mode draws text using the glyph outlines of individual characters rather than as textures. This mode is only supported with the
P3D renderer settings. With the
text_mode(SHAPE) before any other drawing occurs. If the outlines are not available, then
text_mode(SHAPE) will be ignored and
text_mode(MODEL) will be used instead.
text_mode(SHAPE) option in
P3D can be combined with Py5Graphics.begin_raw() to write vector-accurate text to 2D and 3D output files, for instance
SHAPE mode is not currently optimized for
P3D, so if recording shape data, use
text_mode(MODEL) until you’re ready to capture the geometry with Py5Graphics.begin_raw().
This method is the same as text_mode() but linked to a
Py5Graphics object. To see example code for how it can be used, see text_mode().
Underlying Processing method: PGraphics.textMode
text_mode( mode: int, # either MODEL or SHAPE /, ) -> None
Updated on March 06, 2023 02:49:26am UTC