mirror of https://github.com/subgraph/fw-daemon
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
838 B
29 lines
838 B
8 years ago
|
package cairo
|
||
|
|
||
|
// #cgo pkg-config: cairo cairo-gobject
|
||
|
// #include <stdlib.h>
|
||
|
// #include <cairo.h>
|
||
|
// #include <cairo-gobject.h>
|
||
|
import "C"
|
||
|
import (
|
||
|
"unsafe"
|
||
|
)
|
||
|
|
||
|
// Antialias is a representation of Cairo's cairo_antialias_t.
|
||
|
type Antialias int
|
||
|
|
||
|
const (
|
||
|
ANTIALIAS_DEFAULT Antialias = C.CAIRO_ANTIALIAS_DEFAULT
|
||
|
ANTIALIAS_NONE Antialias = C.CAIRO_ANTIALIAS_NONE
|
||
|
ANTIALIAS_GRAY Antialias = C.CAIRO_ANTIALIAS_GRAY
|
||
|
ANTIALIAS_SUBPIXEL Antialias = C.CAIRO_ANTIALIAS_SUBPIXEL
|
||
|
// ANTIALIAS_FAST Antialias = C.CAIRO_ANTIALIAS_FAST (since 1.12)
|
||
|
// ANTIALIAS_GOOD Antialias = C.CAIRO_ANTIALIAS_GOOD (since 1.12)
|
||
|
// ANTIALIAS_BEST Antialias = C.CAIRO_ANTIALIAS_BEST (since 1.12)
|
||
|
)
|
||
|
|
||
|
func marshalAntialias(p uintptr) (interface{}, error) {
|
||
|
c := C.g_value_get_enum((*C.GValue)(unsafe.Pointer(p)))
|
||
|
return Antialias(c), nil
|
||
|
}
|