Exemplo n.º 1
0
// SetMiterLimit is a wrapper around cairo_set_miter_limit().
func (v *Context) SetMiterLimit(limit float64) {
	C.cairo_set_miter_limit(v.native(), C.double(limit))
}
Exemplo n.º 2
0
func (self *Surface) SetMiterLimit(limit float64) {
	C.cairo_set_miter_limit(self.context, C.double(limit))
}
Exemplo n.º 3
0
//SetMiterLimit sets the miter limit.
//
//When the current line join style is LineJoinMiter, the miter limit is used to
//determine whether the lines should be joined with a bevel instead of a miter.
//
//Cairo divides the length of the miter by the line width.
//If the result is greater than the miter limit, the style is converted to a
//bevel.
//
//A miter limit for a given angle can be computed by:
//	miter limit = 1/sin(angle/2)
//
//Examples
//
//For the default of 10, joins with interior angles less than 11 degrees are
//converted from miters to bevels.
//
//For reference, a mite limit of 2 makes the miter cutoff at 60 degrees,
//and a miter limit of 1.414 makes the cutoff at 90 degrees.
//
//Originally cairo_set_miter_limit.
func (c *Context) SetMiterLimit(ml float64) *Context {
	C.cairo_set_miter_limit(c.c, C.double(ml))
	return c
}