Sha256: 5fe05f12dccd6b621f773ae7c71e15eec9106c6abdec17d335db4d7414784852
Contents?: true
Size: 380 Bytes
Versions: 16
Compression:
Stored size: 380 Bytes
Contents
# -*- coding: utf-8 -*- # http://dxruby.sourceforge.jp/DXRubyReference/2009531224931296.htm require 'dxruby' baseimage = Image.load('data.png') # data.pngを読み込む image = baseimage.slice(0, 0, 20, 20) # data.pngの(0, 0)から20*20pixel分だけ画像を切り出す Window.loop do Window.draw(100, 100, image) # data.pngの左上20pixel正方形を描画する end
Version data entries
16 entries across 16 versions & 1 rubygems