def setRotate(name, theta): global ordScene print("write.scene." + toStr(ordScene) + "." + getID() + "." + name + ".rotate") print(str(theta)) stdout.flush() ordScene = ordScene + 1 return ordScene
def drawRect(name, x, y, w, h): global ordScene print("write.scene." + toStr(ordScene) + "." + getID() + "." + name + ".drawRect") print(str(x) + ";" + str(y) + ";" + str(w) + ";" + str(h)) stdout.flush() ordScene = ordScene + 1 return ordScene
def setStroke(name, w): global ordScene print("write.scene." + toStr(ordScene) + "." + getID() + "." + name + ".setStroke") print(str(w)) stdout.flush() ordScene = ordScene + 1 return ordScene
def setTranslate(name, x, y): global ordScene print("write.scene." + toStr(ordScene) + "." + getID() + "." + name + ".translate") print(str(x) + ";" + str(y)) stdout.flush() ordScene = ordScene + 1 return ordScene
def drawLine(name, x1, y1, x2, y2): global ordScene print("write.scene." + toStr(ordScene) + "." + getID() + "." + name + ".drawLine") print(str(x1) + ";" + str(y1) + ";" + str(x2) + ";" + str(y2)) stdout.flush() ordScene = ordScene + 1 return ordScene
def setColor(name, color): global ordScene print("write.scene." + toStr(ordScene) + "." + getID() + "." + name + ".setColor") print( str(color[0]) + ";" + str(color[1]) + ";" + str(color[2]) + ";" + str(color[3])) stdout.flush() ordScene = ordScene + 1 return ordScene
def fillArc(name, x, y, w, h, startAngle, arcAngle): global ordScene print("write.scene." + toStr(ordScene) + "." + getID() + "." + name + ".fillArc") print( str(x) + ";" + str(y) + ";" + str(w) + ";" + str(h) + ";" + str(startAngle) + ";" + str(arcAngle)) stdout.flush() ordScene = ordScene + 1 return ordScene
def drawString(name, string, x, y): if "=" in string: raise NameError("the string '" + string + "' contains forbid char '='") global ordScene print("write.scene." + toStr(ordScene) + "." + getID() + "." + name + ".drawString") print(string + ";" + str(x) + ";" + str(y)) stdout.flush() ordScene = ordScene + 1 return ordScene
def fillPolygon(name, x, y, n_points): global ordScene print("write.scene." + toStr(ordScene) + "." + getID() + "." + name + ".fillPolygon") line = "" for i in range(0, n_points): line = line + str(x[i]) + ";" + str(y[i]) + ";" line = line + str(n_points) print(line) stdout.flush() ordScene = ordScene + 1 return ordScene