Ejemplo n.º 1
0
/* Composite one image onto another at the specified offset. */
func (w *MagickWand) CompositeImage(srcWand *MagickWand, compose, x, y int) error {
	if C.MagickCompositeImage(w.wand, srcWand.wand, C.CompositeOperator(compose), C.ssize_t(x), C.ssize_t(y)) == C.MagickFalse {
		eStr, eCode := w.Exception()
		return fmt.Errorf("CompositeImage() failed : [%d] %s", eStr, eCode)
	}

	return nil
}
Ejemplo n.º 2
0
// Composites an image onto the current image, using the specified composition
// operator, specified position, and at the specified size.
//
// compose: composition operator
//
// x: x ordinate of top left corner
//
// y: y ordinate of top left corner
//
// width: Width to resize image to prior to compositing. Specify zero to use
// existing width.
//
// height: Height to resize image to prior to compositing. Specify zero to use
// existing height.
//
// mw: Image to composite is obtained from this wand.
//
func (dw *DrawingWand) Composite(compose CompositeOperator, x, y, width, height float64, mw *MagickWand) error {
	C.DrawComposite(dw.dw, C.CompositeOperator(compose), C.double(x), C.double(y), C.double(width), C.double(height), mw.mw)
	return dw.GetLastError()
}