示例#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))
}
示例#2
0
文件: pplot.go 项目: 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))
}