DXRuby 1.4.6 Reference Manual
INDEX > RenderTarget > draw_ex

RenderTarget#draw_ex(x, y, image, option={})

Description

拡縮、回転、半透明、加算合成を一括指定して描画します。
具体例はTIPSを参照してください。

Parameters

x Integer
X座標
y Integer
Y座標
image Image|RenderTarget
描画元の画像オブジェクト
option Hash
オプション
:scale_x Float (default: 1)
横の拡大率。
:scale_y Float (default: 1)
縦の拡大率。
:center_x Integer (default: nil)
回転、拡大の中心X座標。nilで画像の中心になります。
:center_y Integer (default: nil)
回転、拡大の中心Y座標。nilで画像の中心になります。
:alpha Integer (default: 255)
アルファ値(0~255)。
:blend Symbol (default: :alpha)
:blend :alpha、:none、:add、:add2、:subで合成方法を指定。:noneは透明色、半透明色もそのまま上書き描画します。:addはソースにアルファ値を、:add2は背景に255-アルファ値を適用します。:subはアルファ値を全ての色の合成に、:sub2はRGBの色をそれぞれ別々に合成に適用します。
:color Array (default: [255,255,255])
[R, G, B]で、それぞれ0~255、省略すると[255, 255, 255]になります。
:angle Integer (default: 0)
360度系で画像の回転角度を指定します。拡大率と同時に指定した場合は拡大率が先に適用されます。
:z Integer|Float (default: 0)
描画順序。
小さいほど奥になり、同じ値の場合は最初にdrawしたものが一番奥になります。
:offset_sync bool (default: false)
描画時の指定座標x/yに、画像のcenter_x/yで指定した位置が来るように補正されます。