AmanithSVG defines a number of primitive data types by means of C typedefs.
SVGTbyte
defines an 8-bit two’s complement signed integer, which may contain values between -128
and 127
, inclusive.
SVGTubyte
defines an 8-bit unsigned integer, which may contain values between 0
and 255
, inclusive.
SVGTshort
defines a 16-bit two’s complement signed integer, which may contain values between -32768
and 32767
, inclusive.
SVGTint
defines a 32-bit two’s complement signed integer.
SVGTuint
defines a 32-bit unsigned integer.
SVGTbitfiel
defines a 32-bit unsigned integer value, used for parameters that may combine a number of independent single-bit values. A SVGTbitfield
must be able to hold at least 32 bits.
SVGTboolean
is an enumeration that only takes on the values of SVGT_FALSE (0)
or SVGT_TRUE (1)
. Any nonzero value used as a SVGTboolean
will be interpreted as SVGT_TRUE
.
typedef enum {
SVGT_FALSE = 0,
SVGT_TRUE = 1
} SVGTboolean;
SVGTfloat
defines a 32-bit IEEE 754 floating-point value.
Data type name | Size | Values range |
---|---|---|
SVGTbyte | 1 byte | [ -128, 127 ] |
SVGTubyte | 1 byte | [ 0, 255 ] |
SVGTshort | 2 byte | [ -32768, 32767 ] |
SVGTint | 4 byte | [ -(2^31), 2^31 - 1 ] |
SVGTuint | 4 byte | [ 0, 2^32 - 1 ] |
SVGTfloat | 4 byte | IEEE 754 Standard |
SVGTboolean | 4 byte | [ SVGT_FALSE(0), SVGT_TRUE(1) ] |
SVGTbitfiled | 4 byte | [ 0, 2^32 - 1 ] |