Пример #1
0
// void cairo_get_dash (cairo_t *cr, double *dashes, double *offset);
func (self *Surface) GetDash() ([]float64, float64) {
	var offset float64
	length := int(C.cairo_get_dash_count(self.context))
	if length == 0 {
		return nil, 0
	}
	dashes := make([]float64, length)

	C.cairo_get_dash(self.context, (*C.double)(unsafe.Pointer(&dashes[0])), (*C.double)(unsafe.Pointer(&offset)))
	return dashes, offset
}
Пример #2
0
// GetDashCount is a wrapper around cairo_get_dash_count().
func (v *Context) GetDashCount() int {
	c := C.cairo_get_dash_count(v.native())
	return int(c)
}
Пример #3
0
//DashCount reports the length of the dash sequence or 0 if dashing is not
//currently in effect.
//
//Originally cairo_get_dash_count.
func (c *Context) DashCount() int {
	return int(C.cairo_get_dash_count(c.c))
}