Originally Posted by SinusPi
DrawLine isn't exactly anything revolutionary, sadly. It's just a shortcut to rotating and resizing texture A on top of texture B so that it resembles a line. It's actually Iriel's code, congratulations on getting featured
Code:
DrawLine(texture, canvasFrame, startX, startY, endX, endY, lineWidth, lineFactor, relPoint)
|
There's a new line widget that may be what you're looking for. It can be animated to scale along the line. It's used in the artifact UI and the new flight map.
Code:
<Frame name="FlightMap_HighlightFlightLineTemplate" virtual="true">
<Layers>
<Layer level="BACKGROUND" textureSubLevel="-1">
<Line parentKey="Fill" file="Interface/TaxiFrame/UI-Taxi-Line" thickness="28" alpha="0" alphaMode="ADD" />
</Layer>
</Layers>
<Animations>
<AnimationGroup parentKey="RevealAnim" setToFinalAlpha="true">
<Alpha parentKey="Alpha" childKey="Fill" duration=".15" fromAlpha="0" toAlpha="1" order="1"/>
<LineScale parentKey="Scale" childKey="Fill" duration=".15" order="1" fromScaleX="0" fromScaleY="1" toScaleX="1" toScaleY="1">
<Origin point="LEFT">
<Offset x="1" y="0"/>
</Origin>
</LineScale>
</AnimationGroup>
<AnimationGroup parentKey="FadeAnim" setToFinalAlpha="true">
<Alpha parentKey="Alpha" childKey="Fill" duration=".1" fromAlpha="1" toAlpha="0" order="1"/>
</AnimationGroup>
</Animations>
</Frame>