Exemplo n.º 1
0
func (h *IupPPlot) AddStrPoints(index int, x []string, y []float32) {
	count := len(x)
	if len(x) > len(y) {
		count = len(y)
	}
	cx := iup.NewCSA(x)
	defer iup.FreeCSA(cx)
	C.IupPPlotAddStrPoints(toNative(h), C.int(index), (**C.char)(unsafe.Pointer(&cx[0])), (*C.float)(unsafe.Pointer(&y[0])), C.int(count))
}
Exemplo n.º 2
0
Arquivo: pplot.go Projeto: DaviWei/iup
func AddStringPoints(ih *iup.Ihandle, index int, x []string, y []float64) {
	count := len(x)

	cX := stringArrayToC(x)
	defer freeCStringArray(cX)

	cY := float64ArrayToC(y)

	C.IupPPlotAddStrPoints(ih.C(), C.int(index), &cX[0], &cY[0], C.int(count))
}