initial commit
This commit is contained in:
24
pydiffvg/color.py
Normal file
24
pydiffvg/color.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import pydiffvg
|
||||
import torch
|
||||
|
||||
class LinearGradient:
|
||||
def __init__(self,
|
||||
begin = torch.tensor([0.0, 0.0]),
|
||||
end = torch.tensor([0.0, 0.0]),
|
||||
offsets = torch.tensor([0.0]),
|
||||
stop_colors = torch.tensor([0.0, 0.0, 0.0, 0.0])):
|
||||
self.begin = begin
|
||||
self.end = end
|
||||
self.offsets = offsets
|
||||
self.stop_colors = stop_colors
|
||||
|
||||
class RadialGradient:
|
||||
def __init__(self,
|
||||
center = torch.tensor([0.0, 0.0]),
|
||||
radius = torch.tensor([0.0, 0.0]),
|
||||
offsets = torch.tensor([0.0]),
|
||||
stop_colors = torch.tensor([0.0, 0.0, 0.0, 0.0])):
|
||||
self.center = center
|
||||
self.radius = radius
|
||||
self.offsets = offsets
|
||||
self.stop_colors = stop_colors
|
Reference in New Issue
Block a user