182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
# File 'lib/ruby2d/sprite.rb', line 182
def draw(x:, y:, width: (@width || @clip_width), height: (@height || @clip_height), rotate: @rotate,
clip_x: @clip_x, clip_y: @clip_y, clip_width: @clip_width, clip_height: @clip_height,
color: [1.0, 1.0, 1.0, 1.0])
Window.render_ready_check
render(x: x, y: y, width: width, height: height, color: Color.new(color), rotate: rotate, crop: {
x: clip_x,
y: clip_y,
width: clip_width,
height: clip_height,
image_width: @img_width,
image_height: @img_height
})
end
|