Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-19-20, 11:48 AM   #1
LudiusMaximus
A Rage Talon Dragon Guard
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 320
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
 

WoWInterface » Developer Discussions » Lua/XML Help » SetStartPoint() offsets not working?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off