本人 用了 for i in 0..15 去处理 Bitmap中的 draw_text 感觉效率很慢
出现 卡 的现象
请问 for 循环处理效率怎样 有比他快些的循环处理吗》??
脚本 是
for i in 0..@size - 1
for s in 0..6
# 刷新画面
Graphics.update
if s != 6
self.contents.font.size = 26 - s
self.contents.fill_rect(x, 0, 40, 32, Color.new( 0, 0, 0,0))
self.contents.draw_text(x, 0, 40, 32, @text[i])
else
self.contents.font.size = 26 - s
self.contents.draw_text(x, 0, 40, 32, @text[i])
end
end
x += self.contents.text_size(@text[i]).width + 1
end