chiark / gitweb /
Added online stat collection, added dropdown 3D button.
[cura.git] / Cura / gui / util / opengl.py
index ef3a0db8d6510dec344ae61fdaa03beb6c9e6be2..87d8508032da1690d49890a37d0941959e6e40de 100644 (file)
@@ -207,6 +207,12 @@ def glDrawStringLeft(s):
        for c in s:
                glutBitmapCharacter(OpenGL.GLUT.GLUT_BITMAP_HELVETICA_18, ord(c))
 
+def glDrawStringRight(s):
+       glRasterPos2f(0, 0)
+       glBitmap(0,0,0,0, -glGetStringSize(s)[0], 0, None)
+       for c in s:
+               glutBitmapCharacter(OpenGL.GLUT.GLUT_BITMAP_HELVETICA_18, ord(c))
+
 def unproject(winx, winy, winz, modelMatrix, projMatrix, viewport):
        npModelMatrix = numpy.matrix(numpy.array(modelMatrix, numpy.float64).reshape((4,4)))
        npProjMatrix = numpy.matrix(numpy.array(projMatrix, numpy.float64).reshape((4,4)))