# Path: opc/matrix/hq.py
# class HQ(object):
# 
#     """
#     use the HQ class to savely wrap art init blocks when you need to
#     switch on HQ for set-up purposes. For example:
# 
#         from opc.matrix import HQ
# 
# 
#         class Art(object):
# 
#             def __init__(self, matrix):
# 
#                 with HQ(matrix):
#                     initialization stuff...
#     """
# 
#     def __init__(self, matrix):
#         self.matrix = matrix
# 
#     def __enter__(self):
#         self.matrix.hq()
# 
#     def __exit__(self, type, value, traceback):
#         self.matrix.hq(False)


from .. _baseclass import ArtBaseClass
from random import random, uniform
from opc.matrix import HQ
from .. utils.pen import Pen




PENS = 4
SCALE = 3
SIZE = 6


class Blobs(ArtBaseClass):

    def __init__(self, matrix, config):
        with HQ(matrix):
            self.pens = []
            for i in range(PENS):
                dx = 1 if (i/2) % 2 == 0 else -1

# Path: opc/matrix/hq.py
# class HQ(object):
# 
#     """
#     use the HQ class to savely wrap art init blocks when you need to
#     switch on HQ for set-up purposes. For example:
# 
#         from opc.matrix import HQ
# 
# 
#         class Art(object):
# 
#             def __init__(self, matrix):
# 
#                 with HQ(matrix):
#                     initialization stuff...
#     """
# 
#     def __init__(self, matrix):
#         self.matrix = matrix
# 
#     def __enter__(self):
#         self.matrix.hq()
# 
#     def __exit__(self, type, value, traceback):
#         self.matrix.hq(False)


# Path: art/baseclasses/blobs.py
from .. _baseclass import ArtBaseClass
from random import random, uniform
from opc.matrix import HQ
from .. utils.pen import Pen





PENS = 4
SCALE = 3
SIZE = 6


class Blobs(ArtBaseClass):

    def __init__(self, matrix, config):
        with HQ(matrix):
            self.pens = []
            for i in range(PENS):
                dx = 1 if (i/2) % 2 == 0 else -1

                dy = 1 if i % 2 == 0 else -1