-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc4f509
commit 08ecbff
Showing
19 changed files
with
338 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
###### (This function is part of SDL_ttf, a separate library from SDL.) | ||
# TTF_GetTextColor | ||
|
||
Get the color of a text object. | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/main/include/SDL3_ttf/SDL_ttf.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
bool TTF_GetTextColor(TTF_Text *text, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a); | ||
``` | ||
## Function Parameters | ||
| | | | | ||
| ---------------------- | -------- | ---------------------------------------------------------------------------------- | | ||
| [TTF_Text](TTF_Text) * | **text** | the [TTF_Text](TTF_Text) to query. | | ||
| Uint8 * | **r** | a pointer filled in with the red color value in the range of 0-255, may be NULL. | | ||
| Uint8 * | **g** | a pointer filled in with the green color value in the range of 0-255, may be NULL. | | ||
| Uint8 * | **b** | a pointer filled in with the blue color value in the range of 0-255, may be NULL. | | ||
| Uint8 * | **a** | a pointer filled in with the alpha value in the range of 0-255, may be NULL. | | ||
## Return Value | ||
(bool) Returns true on success or false on failure; call SDL_GetError() for | ||
more information. | ||
## Thread Safety | ||
This function should be called on the thread that created the text. | ||
## Version | ||
This function is available since SDL_ttf 3.0.0. | ||
## See Also | ||
- [TTF_GetTextColorFloat](TTF_GetTextColorFloat) | ||
- [TTF_SetTextColor](TTF_SetTextColor) | ||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
###### (This function is part of SDL_ttf, a separate library from SDL.) | ||
# TTF_GetTextColorFloat | ||
|
||
Get the color of a text object. | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/main/include/SDL3_ttf/SDL_ttf.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
bool TTF_GetTextColorFloat(TTF_Text *text, float *r, float *g, float *b, float *a); | ||
``` | ||
## Function Parameters | ||
| | | | | ||
| ---------------------- | -------- | ------------------------------------------------------------------------------------------ | | ||
| [TTF_Text](TTF_Text) * | **text** | the [TTF_Text](TTF_Text) to query. | | ||
| float * | **r** | a pointer filled in with the red color value, normally in the range of 0-1, may be NULL. | | ||
| float * | **g** | a pointer filled in with the green color value, normally in the range of 0-1, may be NULL. | | ||
| float * | **b** | a pointer filled in with the blue color value, normally in the range of 0-1, may be NULL. | | ||
| float * | **a** | a pointer filled in with the alpha value in the range of 0-1, may be NULL. | | ||
## Return Value | ||
(bool) Returns true on success or false on failure; call SDL_GetError() for | ||
more information. | ||
## Thread Safety | ||
This function should be called on the thread that created the text. | ||
## Version | ||
This function is available since SDL_ttf 3.0.0. | ||
## See Also | ||
- [TTF_GetTextColor](TTF_GetTextColor) | ||
- [TTF_SetTextColorFloat](TTF_SetTextColorFloat) | ||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
###### (This function is part of SDL_ttf, a separate library from SDL.) | ||
# TTF_SetTextColor | ||
|
||
Set the color of a text object. | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/main/include/SDL3_ttf/SDL_ttf.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
bool TTF_SetTextColor(TTF_Text *text, Uint8 r, Uint8 g, Uint8 b, Uint8 a); | ||
``` | ||
## Function Parameters | ||
| | | | | ||
| ---------------------- | -------- | -------------------------------------------- | | ||
| [TTF_Text](TTF_Text) * | **text** | the [TTF_Text](TTF_Text) to modify. | | ||
| Uint8 | **r** | the red color value in the range of 0-255. | | ||
| Uint8 | **g** | the green color value in the range of 0-255. | | ||
| Uint8 | **b** | the blue color value in the range of 0-255. | | ||
| Uint8 | **a** | the alpha value in the range of 0-255. | | ||
## Return Value | ||
(bool) Returns true on success or false on failure; call SDL_GetError() for | ||
more information. | ||
## Remarks | ||
The default text color is white (255, 255, 255, 255). | ||
## Thread Safety | ||
This function should be called on the thread that created the text. | ||
## Version | ||
This function is available since SDL_ttf 3.0.0. | ||
## See Also | ||
- [TTF_GetTextColor](TTF_GetTextColor) | ||
- [TTF_SetTextColorFloat](TTF_SetTextColorFloat) | ||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
###### (This function is part of SDL_ttf, a separate library from SDL.) | ||
# TTF_SetTextColorFloat | ||
|
||
Set the color of a text object. | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/main/include/SDL3_ttf/SDL_ttf.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
bool TTF_SetTextColorFloat(TTF_Text *text, float r, float g, float b, float a); | ||
``` | ||
## Function Parameters | ||
| | | | | ||
| ---------------------- | -------- | ---------------------------------------------------- | | ||
| [TTF_Text](TTF_Text) * | **text** | the [TTF_Text](TTF_Text) to modify. | | ||
| float | **r** | the red color value, normally in the range of 0-1. | | ||
| float | **g** | the green color value, normally in the range of 0-1. | | ||
| float | **b** | the blue color value, normally in the range of 0-1. | | ||
| float | **a** | the alpha value in the range of 0-1. | | ||
## Return Value | ||
(bool) Returns true on success or false on failure; call SDL_GetError() for | ||
more information. | ||
## Remarks | ||
The default text color is white (1.0f, 1.0f, 1.0f, 1.0f). | ||
## Thread Safety | ||
This function should be called on the thread that created the text. | ||
## Version | ||
This function is available since SDL_ttf 3.0.0. | ||
## See Also | ||
- [TTF_GetTextColorFloat](TTF_GetTextColorFloat) | ||
- [TTF_SetTextColor](TTF_SetTextColor) | ||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
###### (This function is part of SDL_ttf, a separate library from SDL.) | ||
# TTF_SetTextWrapWhitespaceVisible | ||
|
||
Set whether whitespace should be visible when wrapping a text object. | ||
|
||
## Header File | ||
|
||
Defined in [<SDL3_ttf/SDL_ttf.h>](https://github.com/libsdl-org/SDL_ttf/blob/main/include/SDL3_ttf/SDL_ttf.h) | ||
|
||
## Syntax | ||
|
||
```c | ||
bool TTF_SetTextWrapWhitespaceVisible(TTF_Text *text, bool visible); | ||
``` | ||
## Function Parameters | ||
| | | | | ||
| ---------------------- | ----------- | ------------------------------------------------------------- | | ||
| [TTF_Text](TTF_Text) * | **text** | the [TTF_Text](TTF_Text) to modify. | | ||
| bool | **visible** | true to show whitespace when wrapping text, false to hide it. | | ||
## Return Value | ||
(bool) Returns true on success or false on failure; call SDL_GetError() for | ||
more information. | ||
## Remarks | ||
If the whitespace is visible, it will take up space for purposes of | ||
alignment and wrapping. This is good for editing, but looks better when | ||
centered or aligned if whitespace around line wrapping is hidden. This | ||
defaults false. | ||
## Thread Safety | ||
This function should be called on the thread that created the text. | ||
## Version | ||
This function is available since SDL_ttf 3.0.0. | ||
## See Also | ||
- [TTF_TextWrapWhitespaceVisible](TTF_TextWrapWhitespaceVisible) | ||
---- | ||
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.