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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 29 ■ Widget <strong>Reference</strong> 1139Texture has all the methods from Region, VisibleRegion <strong>and</strong> LayeredRegion, plusthe following:GetBlendModeReturns the blend mode <strong>of</strong> the texture.mode = Texture:GetBlendMode()Returns:mode—Blend mode <strong>of</strong> the texture (string)ADD - Adds texture color values to the underlying color values, using thealpha channel; light areas in the texture lighten the background while darkareas are more transparentALPHAKEY - One-bit transparency; pixels with alpha values greater than ∼0.8are treated as fully opaque <strong>and</strong> all other pixels are treated as fully transparentBLEND - Normal color blending, using any alpha channel in the texture imageDISABLE - Ignores any alpha channel, displaying the texture as fully opaqueMOD - Ignores any alpha channel in the texture <strong>and</strong> multiplies texturecolor values by background color values; dark areas in the texturedarken the background while light areas are more transparentGetNonBlockingReturns whether the texture object loads its image file in the background.nonBlocking = Texture:GetNonBlocking()See :SetNonBlocking() <strong>for</strong> further details.Returns:nonBlocking—1 if the texture object loads its image file in the background;nil if the game engine is halted while the texture loads (1nil)GetTexCoordReturns corner coordinates <strong>for</strong> scaling or cropping the texture image.ULx, ULy, LLx, LLy, URx, URy, LRx, LRy = Texture:GetTexCoord()See Texture:SetTexCoord() example <strong>for</strong> details.Returns:ULx—Upper left corner X position, as a fraction <strong>of</strong> the image’s width from theleft (number)ULy—Upper left corner Y position, as a fraction <strong>of</strong> the image’s height from thetop (number)LLx—Lower left corner X position, as a fraction <strong>of</strong> the image’s width from theleft (number)LLy—Lower left corner Y position, as a fraction <strong>of</strong> the image’s height from thetop (number)URx—Upper right corner X position, as a fraction <strong>of</strong> the image’s width from theleft (number)URy—Upper right corner Y position, as a fraction <strong>of</strong> the image’s height from thetop (number)

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

Saved successfully!

Ooh no, something went wrong!