示例#1
0
文件: canvas.go 项目: phacops/canvas
// Rotates the whole canvas.
func (self *Canvas) RotateCanvas(rad float64) error {
	success := C.MagickRotateImage(self.wand, self.bg, C.double(RAD_TO_DEG*rad))

	if success == C.MagickFalse {
		return fmt.Errorf("Could not rotate image: %s", self.Error())
	}

	return nil
}
示例#2
0
// Rotates the whole canvas.
func (cv Canvas) RotateCanvas(rad float64) {
	C.MagickRotateImage(cv.wand, cv.bg, C.double(RAD_TO_DEG*rad))
}