def __init__(self, filepath, height, name):
     StrokeShader.__init__(self)
     # use an ordered dict to maintain input and z-order
     self.shape_map = OrderedDict()
     self.filepath = filepath
     self.h = height
     self._name = name
Exemplo n.º 2
0
 def __init__(self, wsize, threshold_min, threshold_max, thicknessMin, thicknessMax):
     StrokeShader.__init__(self)
     self._func = DensityF0D(wsize)
     self.threshold_min = threshold_min
     self.threshold_max = threshold_max
     self._thicknessMin = thicknessMin
     self._thicknessMax = thicknessMax
Exemplo n.º 3
0
 def __init__(self, x, y, w, kmin, kmax):
     StrokeShader.__init__(self)
     self._x = x
     self._y = y
     self._w = float(w)
     self._kmin = float(kmin)
     self._kmax = float(kmax)
Exemplo n.º 4
0
 def __init__(self, wsize, threshold_min, threshold_max, thicknessMin, thicknessMax):
     StrokeShader.__init__(self)
     self.wsize= wsize
     self.threshold_min= threshold_min
     self.threshold_max= threshold_max
     self._thicknessMin = thicknessMin
     self._thicknessMax = thicknessMax
 def __init__(self, name, style, filepath, res_y, split_at_invisible, stroke_color_mode, frame_current):
     StrokeShader.__init__(self)
     # attribute 'name' of 'StrokeShader' objects is not writable, so _name is used
     self._name = name
     self.filepath = filepath
     self.h = res_y
     self.frame_current = frame_current
     self.elements = []
     self.split_at_invisible = split_at_invisible
     self.stroke_color_mode = stroke_color_mode # BASE | FIRST | LAST
     self.style = style
 def __init__(self, name, style, filepath, res_y, split_at_invisible, frame_current):
     StrokeShader.__init__(self)
     # attribute 'name' of 'StrokeShader' objects is not writable, so _name is used
     self._name = name
     self.filepath = filepath
     self.h = res_y
     self.frame_current = frame_current
     self.elements = []
     self.split_at_invisible = split_at_invisible
     # put style attributes into a single svg path definition
     self.path = '\n<path ' + "".join('{}="{}" '.format(k, v) for k, v in style.items()) + 'd=" M '
Exemplo n.º 7
0
 def __init__(self, *args):
     StrokeShader.__init__(self)
     if len(args) == 8:
         # use 4d vector to simplify math
         self._c1 = Vector(args[:4])
         self._c2 = Vector(args[4:])
     elif len(args) == 2:
         # use 4d vector to simplify math
         self._c1 = Vector(args[0])
         self._c2 = Vector(args[1])
     else:
         raise ValueError("expected eight or two arguments, not " + args)
Exemplo n.º 8
0
 def __init__(self, thicknessMin, thicknessMax, omega=1.2):
     StrokeShader.__init__(self)
     self._thicknessMin = thicknessMin
     self._thicknessMax = thicknessMax
     self.omega = omega
Exemplo n.º 9
0
 def __init__(self, thicknessMin, thicknessMax):
     StrokeShader.__init__(self)
     self._thicknessMin = thicknessMin
     self._thicknessMax = thicknessMax
Exemplo n.º 10
0
 def __init__(self, thicknessExtremity, thicknessMiddle, exponent):
     self._thicknessMin = thicknessMiddle
     self._thicknessMax = thicknessExtremity
     self._exp = exponent
     StrokeShader.__init__(self)
Exemplo n.º 11
0
 def __init__(self, turns=1, random_radius=3, random_center=5):
     StrokeShader.__init__(self)
     self.__turns = turns
     self.__random_center = random_center
     self.__random_radius = random_radius
Exemplo n.º 12
0
 def __init__(self, min, max):
     StrokeShader.__init__(self)
     self.a = max - min
     self.b = min
     self.func = ZDiscontinuityF0D()
Exemplo n.º 13
0
 def __init__(self, lambda1, nbIter):
     StrokeShader.__init__(self)
     self._lambda = lambda1
     self._nbIter = nbIter
     self._normalInfo = Normal2DF0D()
     self._curvatureInfo = Curvature2DAngleF0D()
Exemplo n.º 14
0
 def __init__(self, f, a):
     StrokeShader.__init__(self)
     self._f = f
     self._a = a
     self._getNormal = Normal2DF0D()
Exemplo n.º 15
0
 def __init__(self,r1,g1,b1,a1, r2,g2,b2,a2):
     StrokeShader.__init__(self)
     # use 4d vector to simplify math
     self._c1 = Vector((r1, g1 ,b1, a1))
     self._c2 = Vector((r2, g2, b2, a2))
Exemplo n.º 16
0
 def __init__(self, thicknessMin, thicknessMax, ratio):
     StrokeShader.__init__(self)
     self._thicknessMin = thicknessMin
     self._thicknessMax = thicknessMax
     self._ratio = ratio
Exemplo n.º 17
0
 def __init__(self, a=1.5, n=3):
     StrokeShader.__init__(self)
     self._a = a
     self._n = n
Exemplo n.º 18
0
 def __init__(self, min, max):
     StrokeShader.__init__(self)
     self.__min = min
     self.__max = max
     self.func = GetProjectedZF0D()
Exemplo n.º 19
0
 def __init__(self, thicknessMin, thicknessMax):
     StrokeShader.__init__(self)
     self._thicknessMin = thicknessMin
     self._thicknessMax = thicknessMax
Exemplo n.º 20
0
 def __init__(self, thicknessExtremity, thicknessMiddle, exponent):
     self._thicknessMin = thicknessMiddle
     self._thicknessMax = thicknessExtremity
     self._exp = exponent
     StrokeShader.__init__(self)
Exemplo n.º 21
0
 def __init__(self, thicknessMin, thicknessMax, omega=1.2):
     StrokeShader.__init__(self)
     self._thicknessMin = thicknessMin
     self._thicknessMax = thicknessMax
     self.omega = omega
Exemplo n.º 22
0
 def __init__(self, x, y, z, w, kmin, kmax):
     StrokeShader.__init__(self)
     self._origin = Vector((x, y, z))
     self._w = w
     self._kmin, self._kmax = kmin, kmax
Exemplo n.º 23
0
 def __init__(self, a=1.5, n=3):
     StrokeShader.__init__(self)
     self._a = a
     self._n = n
Exemplo n.º 24
0
 def __init__(self, x, y, z, w, kmin, kmax):
     StrokeShader.__init__(self)
     self._origin = Vector((x, y, z))
     self._w = w
     self._kmin, self._kmax = kmin, kmax
Exemplo n.º 25
0
 def __init__(self, threshold=50):
     StrokeShader.__init__(self)
     self._threshold = threshold
     self._func = MaterialF0D()
Exemplo n.º 26
0
 def __init__(self,r,g,b, a = 1):
     StrokeShader.__init__(self)
     self._color = (r, g, b)
     self._a = a
Exemplo n.º 27
0
 def __init__(self, step=0.01):
     StrokeShader.__init__(self)
     self._step = step
Exemplo n.º 28
0
 def __init__(self, min=0, max=1):
     StrokeShader.__init__(self)
     self.__min = min
     self.__max = max
Exemplo n.º 29
0
 def __init__(self, thickness):
     StrokeShader.__init__(self)
     self._thickness = thickness / 2.0
Exemplo n.º 30
0
 def __init__(self, s=1):
     StrokeShader.__init__(self)
     random.seed = s
Exemplo n.º 31
0
 def __init__(self, turns=1, bb_len=10, mult=1):
     StrokeShader.__init__(self)
     self.__mult = mult
     self.__turns = turns
     self.__bb_len = 1 + bb_len * 0.01
Exemplo n.º 32
0
 def __init__(self, sampling):
     StrokeShader.__init__(self)
     self._sampling = sampling
Exemplo n.º 33
0
 def __init__(self, min, max):
     StrokeShader.__init__(self)
     self.a = max - min
     self.b = min
     self.func = ZDiscontinuityF0D()
Exemplo n.º 34
0
 def __init__(self, l):
     StrokeShader.__init__(self)
     self._l = l
Exemplo n.º 35
0
 def __init__(self, thickness):
     StrokeShader.__init__(self)
     self._thickness = thickness / 2.0
Exemplo n.º 36
0
 def __init__(self, freq=10, amp=10, oct=4, seed=-1):
     StrokeShader.__init__(self)
     self.__noise = Noise(seed)
     self.__freq = freq
     self.__amp = amp
     self.__oct = oct
Exemplo n.º 37
0
 def __init__(self, thicknessMin, thicknessMax, ratio):
     StrokeShader.__init__(self)
     self._thicknessMin = thicknessMin
     self._thicknessMax = thicknessMax
     self._ratio = ratio
Exemplo n.º 38
0
 def __init__(self, turns=1, bb_len=10, bb_rand=0):
     StrokeShader.__init__(self)
     self.__turns = turns # does not have any effect atm
     self.__bb_len = bb_len
     self.__bb_rand = bb_rand
Exemplo n.º 39
0
 def __init__(self, turns=1, bb_len=10, mult=1):
     StrokeShader.__init__(self)
     self.__mult = mult
     self.__turns = turns
     self.__bb_len = 1 + bb_len * 0.01