# Path: ui/render/gl/colors.py
# def productPairsColor(i):
# def exponentialColor(isAlways):
# 
# Path: ui/render/gl/distances.py
# def capLengthOfDividerByLength(length):
# 
# Path: ui/stack/gl.py
# def newGLStack(widths, render):
#   return stack.Stack(widths, GLBackend(render))
# 
# def newTextualGLStack(color, string):
#   widths = [0 for i in range(3)]
#   for x in string:
#     widths[0] += glutStrokeWidth(GLUT_STROKE_ROMAN, ord(x))
#   widths[1] = max_GLUT_STROKE_ROMAN_height
#   def render():
#     color.render()
#     glPushMatrix()
#     for c in string:
#       glutStrokeCharacter(GLUT_STROKE_ROMAN, ord(c))
#     glPopMatrix()
#   return newGLStack(widths, render)
# 
# Path: ui/stack/point.py
# class Point:
#   def __init__(self, x, y, z = 0.0):
#     self._x = x
#     self._y = y
#     self._z = z
# 
#   def transpose(self):
#     return Point(x = self._y, y = self._x, z = self._z)
# 
#   def translate(self, dimension, amount):
#     if dimension == 0:
#       return Point(x = self._x + amount, y = self._y, z = self._z)
#     else:
#       assert(dimension == 1)
#       return Point(x = self._x, y = self._y + amount, z = self._z)
# 
#   def render(self):
#     glVertex(self._x, self._y, self._z)


from OpenGL.GL import *
from ui.render.gl import colors, distances
from ui.stack.gl import newGLStack, newTextualGLStack
from ui.stack.point import Point
        length, distances.conjunctiveDividerWidth,
        distances.capLengthOfDividerByLength(length)))

def quantifierDivider(covariant, length):
  return divider(colors.quantifierDividerColor, _dimension_for_variance(covariant),
      length, distances.quantifier_divider_width,
      distances.capLengthOfDividerByLength(length))

def trueDivider(length):
  return divider(colors.trueColor, 0, length, distances.unit_width,
      distances.capLengthOfDividerByLength(length))

def falseDivider(length):
  return divider(colors.falseColor, 1, length, distances.unit_width,
      distances.capLengthOfDividerByLength(length))

projectDot = solidSquare(colors.projectDotColor,
    [distances.dotWidth, distances.dotWidth, 0.0])
injectDot = solidSquare(colors.injectDotColor,
    [distances.dotWidth, distances.dotWidth, 0.0])

def notSymbol(widths):
  upper = [distances.notThickness, widths[1], 0.0]
  lower = [widths[0], distances.notThickness, 0.0]
  return solidSquare(colors.notColor, upper).below(solidSquare(colors.notColor, lower))

def iff():
  return newTextualGLStack(colors.iffColor, "<==>")

def apply():

# Path: ui/render/gl/colors.py
# def productPairsColor(i):
# def exponentialColor(isAlways):
# 
# Path: ui/render/gl/distances.py
# def capLengthOfDividerByLength(length):
# 
# Path: ui/stack/gl.py
# def newGLStack(widths, render):
#   return stack.Stack(widths, GLBackend(render))
# 
# def newTextualGLStack(color, string):
#   widths = [0 for i in range(3)]
#   for x in string:
#     widths[0] += glutStrokeWidth(GLUT_STROKE_ROMAN, ord(x))
#   widths[1] = max_GLUT_STROKE_ROMAN_height
#   def render():
#     color.render()
#     glPushMatrix()
#     for c in string:
#       glutStrokeCharacter(GLUT_STROKE_ROMAN, ord(c))
#     glPopMatrix()
#   return newGLStack(widths, render)
# 
# Path: ui/stack/point.py
# class Point:
#   def __init__(self, x, y, z = 0.0):
#     self._x = x
#     self._y = y
#     self._z = z
# 
#   def transpose(self):
#     return Point(x = self._y, y = self._x, z = self._z)
# 
#   def translate(self, dimension, amount):
#     if dimension == 0:
#       return Point(x = self._x + amount, y = self._y, z = self._z)
#     else:
#       assert(dimension == 1)
#       return Point(x = self._x, y = self._y + amount, z = self._z)
# 
#   def render(self):
#     glVertex(self._x, self._y, self._z)


# Path: ui/render/gl/primitives.py
from OpenGL.GL import *
from ui.render.gl import colors, distances
from ui.stack.gl import newGLStack, newTextualGLStack
from ui.stack.point import Point

        length, distances.conjunctiveDividerWidth,
        distances.capLengthOfDividerByLength(length)))

def quantifierDivider(covariant, length):
  return divider(colors.quantifierDividerColor, _dimension_for_variance(covariant),
      length, distances.quantifier_divider_width,
      distances.capLengthOfDividerByLength(length))

def trueDivider(length):
  return divider(colors.trueColor, 0, length, distances.unit_width,
      distances.capLengthOfDividerByLength(length))

def falseDivider(length):
  return divider(colors.falseColor, 1, length, distances.unit_width,
      distances.capLengthOfDividerByLength(length))

projectDot = solidSquare(colors.projectDotColor,
    [distances.dotWidth, distances.dotWidth, 0.0])
injectDot = solidSquare(colors.injectDotColor,
    [distances.dotWidth, distances.dotWidth, 0.0])

def notSymbol(widths):
  upper = [distances.notThickness, widths[1], 0.0]
  lower = [widths[0], distances.notThickness, 0.0]
  return solidSquare(colors.notColor, upper).below(solidSquare(colors.notColor, lower))

def iff():
  return newTextualGLStack(colors.iffColor, "<==>")

def apply():

  return newTextualGLStack(colors.applyColor, ".")