forked from joejulian/gio
1e38eec0ab
Instead of allocating and constructing a clip path, store path data directly in op lists. Use separate op lists for cached text layout paths. Signed-off-by: Elias Naur <mail@eliasnaur.com>
27 lines
516 B
Go
27 lines
516 B
Go
// SPDX-License-Identifier: Unlicense OR MIT
|
|
|
|
package path
|
|
|
|
import (
|
|
"unsafe"
|
|
)
|
|
|
|
// The vertex data suitable for passing to vertex programs.
|
|
type Vertex struct {
|
|
CornerX, CornerY int16
|
|
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")
|
|
}
|
|
}
|