2016-03-27 13:01:51 -07:00
|
|
|
// PresentationApp project qml.go
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"image"
|
|
|
|
)
|
|
|
|
|
2018-02-06 20:50:49 -08:00
|
|
|
//imgProvider() for preview images in QML
|
|
|
|
func imgProvider(id string, width, height int) image.Image {
|
2018-02-07 10:00:10 -08:00
|
|
|
var img1 image.Image
|
2018-02-06 20:50:49 -08:00
|
|
|
if imgready && (len(id) > 0) {
|
|
|
|
//fmt.Println("source (provider): ", id)
|
2019-05-06 03:15:55 -07:00
|
|
|
// i1 := strings.Index(id, `;`)
|
|
|
|
// i, _ := strconv.Atoi(id[:i1])
|
|
|
|
// img1 = slides[i].getImage(width, height)
|
2018-02-07 10:00:10 -08:00
|
|
|
} else {
|
|
|
|
img1 = image.NewRGBA(image.Rect(0, 0, 340, 480))
|
2018-02-06 20:50:49 -08:00
|
|
|
}
|
|
|
|
return img1
|
2017-02-05 12:57:50 -08:00
|
|
|
|
2018-02-06 20:50:49 -08:00
|
|
|
}
|