Method: Gosu::TexChunk#draw

Defined in:
lib/gosu_android/graphics/texChunk.rb

#draw(x1, y1, c1, x2, y2, c2, x3, y3, c3, x4, y4, c4, z, mode) ⇒ Object



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/gosu_android/graphics/texChunk.rb', line 38

def draw( x1,  y1,  c1, x2,  y2,  c2, x3,  y3,  c3, x4,  y4,  c4, z, mode)
  op = @queues.op_pool.newDrawOp
  op.render_state.tex_name = @info.tex_name
  op.render_state.mode = mode

  if Gosu::reorder_coordinates_if_necessary(x1, y1, x2, y2, x3, y3, c3, x4, y4, c4)
    x3, y3, c3, x4, y4, c4 = x4, y4,c4, x3, y3, c3
  end
  op.vertices_or_block_index = 4
  op.vertices[0].set(x1, y1, c1)
  op.vertices[1].set(x2, y2, c2)
  op.vertices[2].set(x3, y3, c3)
  op.vertices[3].set(x4, y4, c4)

  op.left = @info.left
  op.top = @info.top
  op.right = @info.right
  op.bottom = @info.bottom

  op.z = z
  @queues.schedule_draw_op(op)
end