设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 6445|回复: 1
打印 上一主题 下一主题

[通用发布] DrawSofteningText ( 描绘羽化字符 ) [2012.3.25]

[复制链接]

虚構歪曲

梦石
0
星屑
309
在线时间
1194 小时
注册时间
2010-12-18
帖子
3928

贵宾

跳转到指定楼层
1
发表于 2011-5-14 11:07:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 忧雪の伤 于 2012-8-2 16:19 编辑
  1. #==============================================================================
  2. #  Name [ DrawSofteningText ( 描绘羽化字符 ) ]
  3. #  Apply To [ RPG Maker XP & RPG Maker VX & RPG Maker VX Ace ]
  4. #------------------------------------------------------------------------------
  5. #  Author [ 忧雪の伤 ]
  6. #  Last Update [ 2012.3.25 ]
  7. #------------------------------------------------------------------------------
  8. #  Link [ 66RPG Ideal Script Association ]
  9. #  => http://rpg.blue/group-215-1.html
  10. #  Link [ OWL Authors' Protection Organization ]
  11. #  => http://oapo.qzworld.net/index.html
  12. #==============================================================================

  13. #==============================================================================
  14. # * Test Section
  15. #==============================================================================

  16. unless Module.constants.include? RUBY_VERSION == '1.9.2' ? :ISA : 'ISA'
  17.   message = "You need to add that script over this."
  18.   method(RUBY_VERSION == '1.9.2' ? :msgbox : :p)[message]
  19.   `start http://rpg.blue/thread-181551-1-1.html`
  20. end

  21. #==============================================================================
  22. # * Registered Section
  23. #==============================================================================

  24. $imported['DrawSofteningText'] = '2012.3.25'

  25. #==============================================================================
  26. # * Running Section
  27. #==============================================================================

  28. module ISA::DrawSofteningText
  29.   Bitmap.send :include, self
  30.   def draw_softening_text *args
  31.     if args[0].is_a? Rect
  32.       args = [args[0].x, args[0].y, args[0].width, args[0].height] + args[1..-1]
  33.     end
  34.     5.step(9) {|item|
  35.       next unless args[item].nil?
  36.       args[item] = [0, Color.new(0, 0, 0), 1, 1, 20][item - 5]
  37.     }
  38.     src_bitmap = Bitmap.new width, height
  39.     src_bitmap.font = font.dup
  40.     src_bitmap.font.color = args[6]
  41.     begin
  42.       src_bitmap.font.shadow = false
  43.       src_bitmap.font.outline = false
  44.     rescue
  45.       nil
  46.     end
  47.     (-args[7]).step(args[7]) {|x|
  48.       (-args[7]).step(args[7]) {|y|
  49.         next if x.zero? && y.zero?
  50.         src_bitmap.draw_text args[0] + x, args[1] + y, *args[2, 4]
  51.       }
  52.     }
  53.     (-args[8]).step(args[8]) {|x|
  54.       (-args[8]).step(args[8]) {|y|
  55.         next if x.zero? && y.zero?
  56.         src_rect = Rect.new 0, 0, width - args[8], height - args[8]
  57.         src_bitmap.blt x, y, src_bitmap, src_rect, args[9]
  58.       }
  59.     }
  60.     blt 0, 0, src_bitmap, rect
  61.     original_font = font.dup
  62.     begin
  63.       font.shadow = false
  64.       font.outline = false
  65.     rescue
  66.       nil
  67.     end
  68.     draw_text *args[0, 6]
  69.     self.font = original_font
  70.     nil
  71.   end
  72. end
复制代码

评分

参与人数 1星屑 +14 收起 理由
yanzheng868 + 14

查看全部评分

梦石
0
星屑
92
在线时间
468 小时
注册时间
2011-9-1
帖子
404
2
发表于 2012-1-31 10:33:48 | 只看该作者
耶!沙发,沙发!
男人不懂永远月经的痛,就像女人永远不懂蛋疼的痛
回复 支持 反对

使用道具 举报

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-2 15:27

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表