render_textureのscaleについて

4 views
Skip to first unread message

Daigo

unread,
Jun 26, 2008, 3:37:30 AM6/26/08
to Star Ruby
現在、テクスチャを描画するときには

もしも:width, :heightオプションがあれば、
dst.render_texture(src, 0, 0, :width => 20, :height => 20, :src_width
=> 8, :src_height => 8)
と書けるところを、
dst.render_texture(src, 0, 0, :scale_x => 20 / 8, :scale_y => 20 /
8, :src_width => 8, :src_height => 8)

と書かなければなりません。

実用上は:width, :heightで指定するような場面の方が多いと思うので、前者の方が便利なのじゃないかなあ と思ったりするのですが、みな
さんはどうお考えでしょうか?
Reply all
Reply to author
Forward
0 new messages