You can check my code here to see how to do it:
https://github.com/greven/oUF_lumen/.../core.lua#L120
Lua Code:
-- Create Glow Border
function core:setglowBorder(self)
self.Glowborder = CreateFrame("Frame", nil, self)
self.Glowborder:SetFrameLevel(0)
self.Glowborder:SetPoint("TOPLEFT", self, "TOPLEFT", -6, 6)
self.Glowborder:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", 6, -6)
self.Glowborder:SetBackdrop({bgFile = m.textures.white_square, edgeFile = m.textures.glow_texture,
tile = false, tileSize = 16, edgeSize = 4, insets = {left = -4, right = -4, top = -4, bottom = -4}})
self.Glowborder:SetBackdropColor(0, 0, 0, 0)
self.Glowborder:SetBackdropBorderColor(0, 0, 0, 1)
end
And my Castbar module:
https://github.com/greven/oUF_lumen/...ts/castbar.lua
This code might need some clean up but the principle still applies.