add ImageFromImage()
This commit is contained in:
parent
b32467e017
commit
b63c9257c5
1 changed files with 9 additions and 0 deletions
|
@ -282,6 +282,15 @@ func ImageCopy(image *Image) *Image {
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create an image from another image piece
|
||||||
|
func ImageFromImage(image Image, rec Rectangle) Image {
|
||||||
|
cimage := image.cptr()
|
||||||
|
crec := rec.cptr()
|
||||||
|
ret := C.ImageFromImage(*cimage, *crec)
|
||||||
|
v := newImageFromPointer(unsafe.Pointer(&ret))
|
||||||
|
return *v
|
||||||
|
}
|
||||||
|
|
||||||
// ImageText - Create an image from text (default font)
|
// ImageText - Create an image from text (default font)
|
||||||
func ImageText(text string, fontSize int32, col color.RGBA) *Image {
|
func ImageText(text string, fontSize int32, col color.RGBA) *Image {
|
||||||
ctext := C.CString(text)
|
ctext := C.CString(text)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue