Does anyone know how to use the LineMixin? I tried messing around with it but I'm not sure how to properly mix it with a texture.
Lua Code:
-- Mix this into a Texture to be able to treat it like a line
LineMixin = {};
function LineMixin:SetStartPoint(x, y)
self.startX, self.startY = x, y;
end
function LineMixin:SetEndPoint(x, y)
self.endX, self.endY = x, y;
end
function LineMixin:SetThickness(thickness)
self.thickness = thickness;
end
function LineMixin:Draw()
local parent = self:GetParent();
local x, y = parent:GetLeft(), parent:GetBottom();
self:ClearAllPoints();
DrawLine(self, parent, self.startX - x, self.startY - y, self.endX - x, self.endY - y, self.thickness or 32, 1);
end