Tk_GetJoinStyle(3)
β¨ Tk_GetJoinStyle β¨
okay bestie, welcome to the Tk_GetJoinStyle(3) page from the Tk Library Procedures π
this one's all about translating between strings and join styles, and honestly? it's giving "small but iconic" π
πΈ NAME πΈ
Tk_GetJoinStyle, Tk_NameOfJoinStyle β the little duo that translates between strings and join styles π¦ like, one goes string β‘οΈ style, the other goes style β‘οΈ string. bestie behavior, fr fr.
β SYNOPSIS β
#include <tk.h>
int
Tk_GetJoinStyle(interp, string, joinPtr)
const char *
Tk_NameOfJoinStyle(join)
π ARGUMENTS π
Tcl_Interp *interp(in) β the interpreter you use for error reporting. it just hangs out and holds the error messages for you π«Άconst char *string(in) β a string with the name of a join style, and it's one ofβbevelβ,βmiterβ, orβroundββ or honestly any unique abbreviation of one of those, we're not picky β¨int *joinPtr(out) β pointer to the spot where we stash the X join style that corresponds tostringπint join(in) β the join style itself, like one ofJoinBevel,JoinMiter,JoinRoundπ
π DESCRIPTION π
So Tk_GetJoinStyle places in *joinPtr the X join style corresponding to string, which is gonna be one of JoinBevel, JoinMiter, or JoinRound. join styles are typically used in X graphics contexts to show how adjacent line segments should be joined together β like literally how the lines hug at the corners, iykyk π and yeah, see the X documentation for what each style actually implies, that's not our lore to spill.
Under normal circumstances the return value is TCL_OK and interp is just... unused. sitting there. main character energy but no lines π But! if string doesn't contain a valid join style, or an abbreviation of one of these names, then an error message gets stored in interpreter interp's result, TCL_ERROR is returned, and *joinPtr is left unmodified. no cap, it stays exactly as it was π«Ά
Tk_NameOfJoinStyle is the logical inverse of Tk_GetJoinStyle. give it a join style like JoinBevel and it returns a statically-allocated string corresponding to join β¨ and if join is not a legal join style? then βunknown join styleβ is returned. that's it, that's the whole vibe π
π₯ KEYWORDS π₯
bevel, join style, miter, round π
bestie reminder: the valid strings are literally onlyβbevelβ,βmiterβ, andβroundβ(or a unique abbreviation) β don't come at it with anything else or you getTCL_ERRORand*joinPtrstays untouched π
and that's the page!! mwah π this was Tk, and the doc is from Tk_GetJoinStyle(3) β go forth and join those segments, you're gonna slay π§ββοΈπ
π¦ where this page comes from
- alpine 3.23: tk9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tk9-doc 9.0.3-r2 Β· TCL
- fedora 43: tk-devel 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 43: tk-devel 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk-devel 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk-devel 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- nixos 26.05: tk 9.0.3
- nixpkgs unstable: tk 9.1.0
- Copyright (c) 1990 The Regents of the University of California
- Copyright (c) 1994-1996 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms