12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 29 ■ Widget <strong>Reference</strong> 1251distinct order indices, <strong>and</strong> these will be assigned automatically as new pointsare created.Arguments:order—Position at which the control point will be traversed relativeto others in the same path animation (between 0 <strong>and</strong> 100) (number)SetParentSets a new path animation parent <strong>for</strong> a control point.ControlPoint:SetParent([path [, order]]) or iControlPoint:SetParent([“path“ [, order]])Arguments:path (optional)—The path object to be set as parent. (table)path (optional)—The name <strong>of</strong> a path object to be set as parent. (string)order (optional)—The order index to set <strong>for</strong> the control point in the new parentanimation. (number)RotationRotation is an Animation that automatically applies an affine rotation to the regionbeing animated. You can set the origin around which the rotation is being done, <strong>and</strong>the angle <strong>of</strong> rotation in either degrees or radians.Rotation animations have no effect on FontStrings.Rotation has all the methods from Animation, plus the following:GetDegreesReturns the animation’s rotation amount (in degrees).degrees = Rotation:GetDegrees()Returns:degrees—Amount by which the region rotates over the animation’s duration(in degrees; positive values <strong>for</strong> counter-clockwise rotation, negative <strong>for</strong> clockwise)(number)GetOriginReturns the rotation animation’s origin point.point, xOffset, yOffset = Rotation:GetOrigin()During a rotation animation, the origin point remains in place while thepositions <strong>of</strong> all other points in the scaled region are moved according to therotation amount.Returns:point—Anchor point <strong>for</strong> the rotation origin (string, anchorPoint)xOffset—Horizontal distance from the anchor point to the rotation origin (inpixels) (number)yOffset—Vertical distance from the anchor point to the rotation origin (in pixels)(number)GetRadiansReturns the animation’s rotation amount (in radians).radians = Rotation:GetRadians()

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!