Skip to content

Commit

Permalink
[ADD] CompositeImageGravity
Browse files Browse the repository at this point in the history
  • Loading branch information
linfangrong authored and justinfx committed Sep 24, 2019
1 parent ad4d069 commit ce98062
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions imagick/magick_wand_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,18 @@ func (mw *MagickWand) CompositeImageChannel(channel ChannelType, source *MagickW
return mw.getLastErrorIfFailed(ok)
}

// Composite one image onto another at the specified offset.
// source: The magick wand holding source image.
// compose: This operator affects how the composite is applied to the image.
// The default is Over.
// gravity : positioning gravity.
//
func (mw *MagickWand) CompositeImageGravity(source *MagickWand, compose CompositeOperator, gravity GravityType) error {
ok := C.MagickCompositeImageGravity(mw.mw, source.mw, C.CompositeOperator(compose), C.GravityType(gravity))
runtime.KeepAlive(source)
return mw.getLastErrorIfFailed(ok)
}

// Composite the images in the source wand over the images in the destination
// wand in sequence, starting with the current image in both lists. Each layer
// from the two image lists are composted together until the end of one of the
Expand Down

0 comments on commit ce98062

Please sign in to comment.