mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
591c89ab0a
They're a pain to support. Encode the single integer value we have as a float instead. Signed-off-by: Elias Naur <mail@eliasnaur.com>
28 lines
560 B
Go
28 lines
560 B
Go
// SPDX-License-Identifier: Unlicense OR MIT
|
|
|
|
package path
|
|
|
|
import (
|
|
"unsafe"
|
|
)
|
|
|
|
// The vertex data suitable for passing to vertex programs.
|
|
type Vertex struct {
|
|
// Corner encodes the corner: +0.5 for south, +.25 for east.
|
|
Corner float32
|
|
MaxY float32
|
|
FromX, FromY float32
|
|
CtrlX, CtrlY float32
|
|
ToX, ToY float32
|
|
}
|
|
|
|
const VertStride = 7*4 + 2*2
|
|
|
|
func init() {
|
|
// Check that struct vertex has the expected size and
|
|
// that it contains no padding.
|
|
if unsafe.Sizeof(*(*Vertex)(nil)) != VertStride {
|
|
panic("unexpected struct size")
|
|
}
|
|
}
|