|
|
Link #21 | |
|
Waiting...
FansubberJoin Date: Jan 2007
Location: Arabian world
Age: 24
|
sorry , I was to lazy & I didn't expect someone will need it
![]() OK , but I warn you , my english is crap Code:
-- Original written by Haider Ben Abu Baker
name = "gradient"
description = "Stupid gradient Effect "
configuration = {}
version, kind = 3, 'basic_ass'
include("karaskel-adv.lua")
function do_syllable(meta, styles, config, line, syl)
local output = {n=0}
local x=syl.center + line.centerleft
local y = 40
l = copy_line(line)
l.text = string.format("{\\an8\\pos(%d,%d)\\1c&H0000FF&}%s",x,y,
syl.text_stripped)
l.layer = 0 -- put the red (copy?) at lower layer
table.insert(output, l)
-- make 15 copies , each one will be at seprate layer
for i = 0,14 do
l = copy_line(line)
l.text = string.format("{\\be1\\an8\\pos(%d,%d)\\1c&H%02X%02XFF&\\clip
(0,0,640,%d)}%s",x,y,i*5,i*20+10,62-i ,syl.text_stripped)
l.layer = i --put every copy at a layer equals to the loop variable
-- that mean , every layer will be at top of the (previos)
table.insert(output, l)
end
return output
end
--[[
string.format("{\\be1\\an8\\pos(%d,%d)\\1c&H%02X%02XFF&\\clip(0,0,640,%d)}%
s",x,y,i*5,i*20+10,62-i ,syl.text_stripped)
will , it's hard to say it in english }{
I just chnge the color of each copy & tried to make change for (red) to yellow
by using this format (1c&H%02X%02XFF)
the red chaneel is (constat) but blue &green are change throw the loop ,
I just add\multiply to the loop variable to icrease Blue & Green , so the color goes from red\orange\yellow
%02X convert loop variable to Hexadicimal
for \clip , it clips the text form the center (62 atthis case ) then decrease the place to clip by the loop cariable (62-i) .
]]
oh yeah , if wish to move the text , change that two copies with this Quote:
I know it's Ugly~ and Unreadable , but it works fine(will... the movment is really Ugly...) now you just have change the (x)&(y) values as you like & then change the 4th clip parameter to the center of the word position (I get it manually coz I don't know a way to get it with Auto\Lua >< jfs may help us with this,,,nooop I don't think he'll did ...Auto3 is dead for him )
__________________
|
|
|
|
|
![]() |
| Thread Tools | |
|
|