Thread: gradient
View Single Post
05-24-10, 09:52 AM   #16
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 318
As far as I know, you can't use gradient on the backdrop so you can't use a backdrop to tile your texture if that's what you want.

You seem to do some crazy stuff though..

Here's an example of tilling a texture vertically and fading it (just used a random texture from WoW):

lua Code:
  1. local frame = CreateFrame("Frame", nil, UIParent)
  2. frame:SetHeight(512)
  3. frame:SetWidth(256)
  4. frame:SetPoint("CENTER")
  5.  
  6. -- Instead of using a backdrop, you create a texture as the background
  7. frame.bg = frame:CreateTexture(nil, "BACKGROUND")
  8. frame.bg:SetAllPoints(frame)
  9. frame.bg:SetTexture("Interface/OPTIONSFRAME/NvidiaLogo", true)
  10. frame.bg:SetTexCoord(0, 1, 0, frame:GetHeight()/64)
  11. -- the last bit above is basically <frame-height>/<tex-height>,
  12. -- to squeeze in as many full-sized tiles as possible, so you might
  13. -- have to tweak this to your preference. The original texture I
  14. -- used is 256x64 in size.
  15. frame.bg:SetGradientAlpha("VERTICAL", 1, 1, 1, 0, 1, 1, 1, .6)

Looks like this (again, the skybox):

__________________
Oh, the simulated horror!
  Reply With Quote