Example #1
0
 def __init__(self, freq=10, amp=10, oct=4, angle=radians(45), seed=-1):
     StrokeShader.__init__(self)
     self.noise = Noise(seed)
     self.freq = freq
     self.amp = amp
     self.oct = oct
     self.dir = Vector((cos(angle), sin(angle)))
Example #2
0
 def __init__(self, freq=10, amp=10, oct=4, angle=radians(45), seed=-1):
     StrokeShader.__init__(self)
     self.noise = Noise(seed)
     self.freq = freq
     self.amp = amp
     self.oct = oct
     self.dir = Vector((cos(angle), sin(angle)))
Example #3
0
 def __init__(self, pivot, scale_x, scale_y, angle, pivot_u, pivot_x, pivot_y):
     StrokeShader.__init__(self)
     self.pivot = pivot
     self.scale = Vector((scale_x, scale_y))
     self.cos_theta = cos(angle)
     self.sin_theta = sin(angle)
     self.pivot_u = pivot_u
     self.pivot_x = pivot_x
     self.pivot_y = pivot_y
     if pivot not in {'START', 'END', 'CENTER', 'ABSOLUTE', 'PARAM'}:
         raise ValueError("expected pivot in {'START', 'END', 'CENTER', 'ABSOLUTE', 'PARAM'}, not" + pivot)
Example #4
0
 def __init__(self, pivot, scale_x, scale_y, angle, pivot_u, pivot_x, pivot_y):
     StrokeShader.__init__(self)
     self.pivot = pivot
     self.scale = Vector((scale_x, scale_y))
     self.cos_theta = cos(angle)
     self.sin_theta = sin(angle)
     self.pivot_u = pivot_u
     self.pivot_x = pivot_x
     self.pivot_y = pivot_y
     if pivot not in {'START', 'END', 'CENTER', 'ABSOLUTE', 'PARAM'}:
         raise ValueError("expected pivot in {'START', 'END', 'CENTER', 'ABSOLUTE', 'PARAM'}, not" + pivot)
Example #5
0
 def __init__(self, thickness, position, ratio):
     StrokeShader.__init__(self)
     ThicknessModifierMixIn.__init__(self)
     if position == 'CENTER':
         self.outer = thickness * 0.5
         self.inner = thickness - self.outer
     elif position == 'INSIDE':
         self.outer = 0
         self.inner = thickness
     elif position == 'OUTSIDE':
         self.outer = thickness
         self.inner = 0
     elif position == 'RELATIVE':
         self.outer = thickness * ratio
         self.inner = thickness - self.outer
     else:
         raise ValueError("unknown thickness position: " + position)
Example #6
0
 def __init__(self, thickness, position, ratio):
     StrokeShader.__init__(self)
     ThicknessModifierMixIn.__init__(self)
     if position == 'CENTER':
         self.outer = thickness * 0.5
         self.inner = thickness - self.outer
     elif position == 'INSIDE':
         self.outer = 0
         self.inner = thickness
     elif position == 'OUTSIDE':
         self.outer = thickness
         self.inner = 0
     elif position == 'RELATIVE':
         self.outer = thickness * ratio
         self.inner = thickness - self.outer
     else:
         raise ValueError("unknown thickness position: " + position)
Example #7
0
 def __init__(self, start, end, x, y):
     StrokeShader.__init__(self)
     self.start = start
     self.end = end
     self.xy = Vector((x, y))
Example #8
0
 def __init__(self, wavelength, amplitude, phase):
     StrokeShader.__init__(self)
     self.wavelength = wavelength
     self.amplitude = amplitude
     self.phase = phase / wavelength * 2 * pi
Example #9
0
 def __init__(self, blend_type, influence):
     StrokeShader.__init__(self)
     self.blend_type = blend_type
     self.influence = influence
Example #10
0
 def __init__(self, blend, influence, ramp):
     StrokeShader.__init__(self)
     self.blend = blend
     self.influence = influence
     self.ramp = ramp
 def __init__(self, w, h):
     StrokeShader.__init__(self)
     self.width, self.height = w, h
Example #12
0
 def __init__(self, start, end, x, y):
     StrokeShader.__init__(self)
     self.start = start
     self.end = end
     self.xy = Vector((x, y))
Example #13
0
 def __init__(self, wavelength, amplitude, phase):
     StrokeShader.__init__(self)
     self.wavelength = wavelength
     self.amplitude = amplitude
     self.phase = phase / wavelength * 2 * pi
Example #14
0
 def __init__(self, blend_type, influence):
     StrokeShader.__init__(self)
     self.blend_type = blend_type
     self.influence = influence
Example #15
0
 def __init__(self, blend, influence, ramp):
     StrokeShader.__init__(self)
     self.blend = blend
     self.influence = influence
     self.ramp = ramp
Example #16
0
 def __init__(self, pattern):
     StrokeShader.__init__(self)
     self.pattern = pattern
Example #17
0
 def __init__(self, pattern):
     StrokeShader.__init__(self)
     self.pattern = pattern