「てけとう」の編集履歴(バックアップ)一覧はこちら

てけとう」(2010/04/11 (日) 18:38:58) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

require 'dxruby' module EFTX @font = Font.new 16 @sprites = [] def self.set(text,x,y,type) font = @font image = Image.new(font.getWidth(text),font.size) image.drawFont(0,0,text,font) ary = text.split(/./) total_length = 0 for i in 0..ary.size #total_length += font.getWidth(ary[i]) @sprites.push Character.new( image.slice(total_length,0,font.getWidth(ary[i]),font.size), 0, 0, x, y, 16, nil ) end end def self.update @sprites.each{|i|i.update} end class Character def initialize(image,sx,sy,dx,dy,spd,id) @image = image @x = sx @y = sy end def update Window.draw(@x,@y,@image) end end end FONT = Font.new(16) image = Image.new(640,480) image.drawFont(100,100,"イベントホライゾン",FONT) EFTX.set("スタンダード病理学第二版",300,240,nil) Window.loop do EFTX.update Window.draw(0,0,image) end

表示オプション

横に並べて表示:
変化行の前後のみ表示:
人気記事ランキング
目安箱バナー