赞 | 0 |
VIP | 77 |
好人卡 | 306 |
积分 | 1 |
经验 | 85662 |
最后登录 | 2023-11-23 |
在线时间 | 1782 小时 |
Lv1.梦旅人 虱子
- 梦石
- 0
- 星屑
- 121
- 在线时间
- 1782 小时
- 注册时间
- 2010-6-19
- 帖子
- 3597
|
- #==============================================================================
- # ◎ GPRA_Bitmap
- #------------------------------------------------------------------------------
- # ◎ Bitmap功能加强
- #------------------------------------------------------------------------------
- # 制作者:绿梨子红苹果
- # 个人主页:vbgm.9126.com
- # E-Mail:[email protected]
- # QQ:42378361
- #==============================================================================
- class Bitmap
- # 影子字
- def draw_text_s(x, y, width, height, str, align=0)
- # 保存当前颜色
- r=self.font.color.red
- g=self.font.color.green
- b=self.font.color.blue
- # 颜色更改成黑色
- self.font.color.set(255, 255, 255)
- # 绘制影子
- self.draw_text(x+2, y+2, width, height, str, align)
- # 恢复原始字色
- self.font.color.set(r,g,b)
- # 绘制原来的字
- self.draw_text(x, y, width, height, str, align)
- end
- # 描边字
- def draw_text_f(x, y, width, height, str, align=0,floor=1)
- # 保存当前颜色
- r=self.font.color.red
- g=self.font.color.green
- b=self.font.color.blue
- # 颜色更改成黑色
- self.font.color.set(0,0,0)
- # 绘制边框
- self.draw_text(x-floor, y-floor, width, height, str, align)
- self.draw_text(x-floor, y+floor, width, height, str, align)
- self.draw_text(x+floor, y-floor, width, height, str, align)
- self.draw_text(x+floor, y+floor, width, height, str, align)
- self.draw_text(x, y-floor, width, height, str, align)
- self.draw_text(x, y+floor, width, height, str, align)
- self.draw_text(x-floor, y, width, height, str, align)
- self.draw_text(x+floor, y, width, height, str, align)
- # 恢复原始字色
- self.font.color.set(r,g,b)
- # 绘制原来的字
- self.draw_text(x, y, width, height, str, align)
- end
- end
复制代码 你需要的是描边字 |
|