def translate_alignment(align):
	"""
	Decodes an integer into a tuple for horizontal and vertical height
	
	:param align: alignment integer to decode
	"""

	h = v = 0
	bits = (align & 0x38) >> 3
	if bits & 0x4 == bits:
		v = 0x1 # top
	elif bits & 0x2 == bits:
		v = 0x10 # center
	elif bits & 0x1 == bits:
		v = 0x2 # bottom
	else:
		return h, v
	bits = align & 0x7
	if bits & 0x4 == bits:
		h = 0x4 # left
	elif bits & 0x2 == bits:
		h = 0x10 # center
	elif bits & 0x1 == bits:
		h = 0x8 # right
	else:
		return h, v
	return h, v