Project1
标题:
DrawSofteningText ( 描绘羽化字符 ) [2012.3.25]
[打印本页]
作者:
忧雪の伤
时间:
2011-5-14 11:07
标题:
DrawSofteningText ( 描绘羽化字符 ) [2012.3.25]
本帖最后由 忧雪の伤 于 2012-8-2 16:19 编辑
#==============================================================================
# Name [ DrawSofteningText ( 描绘羽化字符 ) ]
# Apply To [ RPG Maker XP & RPG Maker VX & RPG Maker VX Ace ]
#------------------------------------------------------------------------------
# Author [ 忧雪の伤 ]
# Last Update [ 2012.3.25 ]
#------------------------------------------------------------------------------
# Link [ 66RPG Ideal Script Association ]
# => http://rpg.blue/group-215-1.html
# Link [ OWL Authors' Protection Organization ]
# => http://oapo.qzworld.net/index.html
#==============================================================================
#==============================================================================
# * Test Section
#==============================================================================
unless Module.constants.include? RUBY_VERSION == '1.9.2' ? :ISA : 'ISA'
message = "You need to add that script over this."
method(RUBY_VERSION == '1.9.2' ? :msgbox : :p)[message]
`start http://rpg.blue/thread-181551-1-1.html`
end
#==============================================================================
# * Registered Section
#==============================================================================
$imported['DrawSofteningText'] = '2012.3.25'
#==============================================================================
# * Running Section
#==============================================================================
module ISA::DrawSofteningText
Bitmap.send :include, self
def draw_softening_text *args
if args[0].is_a? Rect
args = [args[0].x, args[0].y, args[0].width, args[0].height] + args[1..-1]
end
5.step(9) {|item|
next unless args[item].nil?
args[item] = [0, Color.new(0, 0, 0), 1, 1, 20][item - 5]
}
src_bitmap = Bitmap.new width, height
src_bitmap.font = font.dup
src_bitmap.font.color = args[6]
begin
src_bitmap.font.shadow = false
src_bitmap.font.outline = false
rescue
nil
end
(-args[7]).step(args[7]) {|x|
(-args[7]).step(args[7]) {|y|
next if x.zero? && y.zero?
src_bitmap.draw_text args[0] + x, args[1] + y, *args[2, 4]
}
}
(-args[8]).step(args[8]) {|x|
(-args[8]).step(args[8]) {|y|
next if x.zero? && y.zero?
src_rect = Rect.new 0, 0, width - args[8], height - args[8]
src_bitmap.blt x, y, src_bitmap, src_rect, args[9]
}
}
blt 0, 0, src_bitmap, rect
original_font = font.dup
begin
font.shadow = false
font.outline = false
rescue
nil
end
draw_text *args[0, 6]
self.font = original_font
nil
end
end
复制代码
作者:
♂雨
时间:
2012-1-31 10:33
耶!沙发,沙发!
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1