Exemple #1
0
// Paints on the image's opacity channel in order to set effected pixels to
// transparent. to influence the opacity of pixels. The available paint
// methods are:
//
// 	ResetMethod: Select all pixels.
//
// 	PointMethod: Select the target pixel
//
// 	ReplaceMethod: Select any pixel that matches the target pixel.
//
// 	FloodfillMethod: Select the target pixel and matching neighbors.
//
// 	FillToBorderMethod: Select the target pixel and neighbors not matching
//                      border color.
//
// x, y: x, y ordinates
// pmethod: paint method
func (dw *DrawingWand) Matte(x, y float64, pmethod PaintMethod) {
	C.DrawMatte(dw.dw, C.double(x), C.double(y), C.PaintMethod(pmethod))
}
Exemple #2
0
// Draws color on image using the current fill color, starting at specified
// position, and using specified paint method. The available paint methods are:
//
// x: x ordinate.
//
// y: y ordinate.
//
// pm: paint method. PointMethod: Recolors the target pixel. ReplaceMethod:
// Recolor any pixel that matches the target pixel. FloodfillMethod: Recolors
// target pixels and matching neighbors. ResetMethod: Recolor all pixels.
//
func (dw *DrawingWand) Color(x, y float64, pm PaintMethod) {
	C.DrawColor(dw.dw, C.double(x), C.double(y), C.PaintMethod(pm))
}