예제 #1
0
파일: cairo.go 프로젝트: raichu/gotk3
// Arc is a wrapper around cairo_arc().
func (v *Context) Arc(xc, yc, radius, angle1, angle2 float64) {
	C.cairo_arc(v.native(), C.double(xc), C.double(yc), C.double(radius), C.double(angle1), C.double(angle2))
}
예제 #2
0
파일: surface.go 프로젝트: ungerik/go-cairo
func (self *Surface) Arc(xc, yc, radius, angle1, angle2 float64) {
	C.cairo_arc(self.context,
		C.double(xc), C.double(yc),
		C.double(radius),
		C.double(angle1), C.double(angle2))
}
예제 #3
0
파일: cairo.go 프로젝트: jimmyfrasche/cairo
//Arc adds a circular arc along the surface of circle from fromAngle
//increasing to toAngle.
//
//If fromAngle < toAngle, then toAngle will be increased by 2π until
//fromAngle > toAngle.
//
//If there is a current point, an initial line segment will be added
//to the path to connect the current point to the beginning of the arc.
//If this initial line is undesired, call ClosePath before Arc.
//
//Angles are measured in radians.
//An angle of 0 is in the direction of the positive X axis in user space.
//An angle of π/2 radians (90°) is in the direction of the positive Y axis
//in user space.
//With the default transformation matrix, angles increase clockwise.
//
//To convert from degrees to radians use
//	degrees * π/180
//
//Arc gives the arc in the direction of increasing angles.
//Use ArcNegative to get the arc in the direction of decreasing
//angles.
//
//The arc is circular in user space.
//
//Originally cairo_arc.
func (c *Context) Arc(circle Circle, fromAngle, toAngle float64) *Context {
	x, y, r := circle.c()
	a1, a2 := C.double(fromAngle), C.double(toAngle)
	C.cairo_arc(c.c, x, y, r, a1, a2)
	return c
}