Quantcast
WoWInterface - View Single Post - SetStartPoint() offsets not working?
View Single Post
10-19-20, 11:48 AM   #1
LudiusMaximus
A Cobalt Mageweaver
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 248
SetStartPoint() offsets not working?

Are these definitions of SetStartPoint() and SetEndPoint() not accurate?
Or what am I doing wrong?

Code:
local f = CreateFrame("Frame", nil, UIParent)
f:SetWidth(50)
f:SetHeight(50)
f:SetPoint("CENTER")
f:Show()

-- Offsets not working.
local line1 = f:CreateLine()
line1:SetThickness(3)
line1:SetColorTexture(1, 0, 0, 1)
line1:SetStartPoint("BOTTOMLEFT", f, "BOTTOMLEFT", 10, 10)
line1:SetEndPoint("TOPRIGHT", f, "TOPRIGHT", -10, -10)

-- Offsets working.
local line2 = f:CreateLine()
line2:SetThickness(3)
line2:SetColorTexture(0, 0, 1, 1)
line2:SetStartPoint("TOPLEFT", 10, -10)
line2:SetEndPoint("BOTTOMRIGHT", -10, 10)
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote