Difference between revisions of "Types"

From uGFX Wiki
Jump to: navigation, search
(Basic)
(Basic)
Line 7: Line 7:
 
|-
 
|-
 
| <code>gBool</code> || A boolean value. Use <code>gTrue</code> and <code>gFalse</code> for assignments & comparisons respectively.
 
| <code>gBool</code> || A boolean value. Use <code>gTrue</code> and <code>gFalse</code> for assignments & comparisons respectively.
 +
|-
 +
| <code>gI8</code> || Signed integer at least 8 bits wide.
 +
|-
 +
| <code>gU8</code> || Unsigned integer at least 8 bits wide.
 +
|-
 +
| <code>gI16</code> || Signed integer at least 16 bits wide.
 +
|-
 +
| <code>gU16</code> || Unsigned integer at least 16 bits wide.
 +
|-
 +
| <code>gI32</code> || Signed integer at least 32 bits wide.
 +
|-
 +
| <code>gU32</code> || Unsigned integer at least 32 bits wide.
 
|}
 
|}
  

Revision as of 15:45, 2 August 2021

µGFX allows to write applications (eg. GUIs) that are completely portable as the library itself is highly agnostic. To achieve this goal, users should rely on the types exposed by µGFX as much as possible to prevent problems when migration to different systems.

Basic

Type Description
gBool A boolean value. Use gTrue and gFalse for assignments & comparisons respectively.
gI8 Signed integer at least 8 bits wide.
gU8 Unsigned integer at least 8 bits wide.
gI16 Signed integer at least 16 bits wide.
gU16 Unsigned integer at least 16 bits wide.
gI32 Signed integer at least 32 bits wide.
gU32 Unsigned integer at least 32 bits wide.

Rendering

Type Description
gCoord A type to express a coordinate in pixels.
gColor A color.
gFont A font. See font rendering.
gImage An image. See images.