Exemple #1
0
def setRotate(name, theta):
    global ordScene
    print("write.scene." + toStr(ordScene) + "." + getID() + "." + name +
          ".rotate")
    print(str(theta))
    stdout.flush()
    ordScene = ordScene + 1
    return ordScene
Exemple #2
0
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
Exemple #3
0
def setStroke(name, w):
    global ordScene
    print("write.scene." + toStr(ordScene) + "." + getID() + "." + name +
          ".setStroke")
    print(str(w))
    stdout.flush()
    ordScene = ordScene + 1
    return ordScene
Exemple #4
0
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
Exemple #5
0
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
Exemple #6
0
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
Exemple #7
0
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
Exemple #8
0
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
Exemple #9
0
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