SYNTAX_RUN
draw a run of text and advance the pen x by its width. More...
Public Attributes
| Name | |
|---|---|
| float | y pen y, constant for the whole line |
| float | x_min left edge of the visible area |
| float | x_max right edge of the visible area |
| ALLEGRO_FONT * | font font every run of the line is drawn with |
| int | done 1 once the pen passed x_max, so the tokenizer stops walking the line |
| float | cx pen x, advanced by the width of each run |
Detailed Description
struct SYNTAX_RUN;
draw a run of text and advance the pen x by its width.
Runs longer than the stack buffer are drawn in successive chunks rather than cut short, which a whole-line mode (plain text, a diff line) would otherwise do to any long line. Chunks never split a UTF-8 sequence.
the horizontal window one syntax line is drawn into, plus the pen carried between its coloured runs. A run that ends left of x_min is measured but not drawn, and the run that takes the pen past x_max ends the line. Without that a single very long line costs one al_draw_text plus one uncached measurement per 511 bytes on every frame, nearly all of it off screen: measured on a 1 MB line, 151 ms per frame before, 0.5 ms after.
Public Attributes Documentation
variable y
float y;
pen y, constant for the whole line
variable x_min
float x_min;
left edge of the visible area
variable x_max
float x_max;
right edge of the visible area
variable font
ALLEGRO_FONT * font;
font every run of the line is drawn with
variable done
int done;
1 once the pen passed x_max, so the tokenizer stops walking the line
variable cx
float cx;
pen x, advanced by the width of each run
Modules
- AABB3D
- ACCEPT_POOL
- ALLEGRO4
- ALLEGRO5
- ANIM_LIB
- ASTAR
- ATLAS_LIB
- AVRO
- CLOCK_SYNC
- COMMONS
- CONFIGFILE
- CYPHER_BASE64
- CYPHER_VIGENERE
- DEAD_RECKONING
- ENUMS
- EXCEPTIONS
- GAME_ENV
- GIT
- GUI
- HASH_TABLE
- ISOMETRIC_ENGINE
- LIST
- LOG
- LOGNODUP
- LZ4
- NETWORKING
- NETWORK_MSG
- N_COOKIES
- N_DIFF
- N_DIGEST
- N_DISK_CACHE
- N_DNS
- N_ECC
- N_ENTROPY
- N_FILES
- N_FLUIDS
- N_GUI_COLOR
- N_GUI_COLORWHEEL
- N_GUI_CURVE
- N_GUI_GRID
- N_GUI_POPUP
- N_HEX
- N_HTTP3
- N_HTTP_COOKIE
- N_HTTP_FORM
- N_HTTP_MIME
- N_HTTP_REQ
- N_HTTP_RESP
- N_HTTP_ROUTER
- N_HTTP_SERVER
- N_ICC
- N_JSON
- N_KAFKA
- N_LINALG
- N_MODULE
- N_OPENSSL_COMPAT
- N_PRETTY
- N_PTH
- N_QUERY
- N_RANDOM
- N_SHA256
- N_STR
- N_TIFF
- N_TIME
- N_USER
- N_X509
- N_ZIP
- PARTICLES
- PCRE
- PHYSICS
- SIGNALS
- STACK
- THREADS
- TRAJECTORY
- TREE
- ZLIB