samples/07_advanced_rendering/04_render_primitive_hierarchies/app/main.rb
def border_as_solid_and_solid_as_border args
  border = [0, 0, 50, 50]
  args.outputs.borders << border
  args.outputs.solids  << border

  # Red, green, blue saturations (last three parameters) can be any number between 0 and 255
  border_with_color = [0, 100, 50, 50, 255, 0, 0]
  args.outputs.borders << border_with_color
  args.outputs.solids  << border_with_color

  border_with_nested_color = [0, 200, 50, 50, [0, 255, 0]] # nested color
  args.outputs.borders << border_with_nested_color
  args.outputs.solids  << border_with_nested_color

  border_with_nested_rect = [[0, 300, 50, 50], 0, 0, 255] # nested rect
  args.outputs.borders << border_with_nested_rect
  args.outputs.solids  << border_with_nested_rect

  border_with_nested_color_and_rect = [[0, 400, 50, 50], [255, 0, 255]] # nested rect and color
  args.outputs.borders << border_with_nested_color_and_rect
  args.outputs.solids  << border_with_nested_color_and_rect
end
# Shows a border being output onto the screen as a border and a solid
# Also shows how colors can be set
Shows a border being output onto the screen as a border and a solid
Also shows how colors can be set
Shows a border being output onto the screen as a border and a solid Also shows how colors can be set
def border_as_solid_and_solid_as_border args
  border = [0, 0, 50, 50]
  args.outputs.borders << border
  args.outputs.solids  << border
  border_with_color = [0, 100, 50, 50, 255, 0, 0]
  args.outputs.borders << border_with_color
  args.outputs.solids  << border_with_color
  border_with_nested_color = [0, 200, 50, 50, [0, 255, 0]] 
  args.outputs.borders << border_with_nested_color
  args.outputs.solids  << border_with_nested_color
  border_with_nested_rect = [[0, 300, 50, 50], 0, 0, 255] 
  args.outputs.borders << border_with_nested_rect
  args.outputs.solids  << border_with_nested_rect
  border_with_nested_color_and_rect = [[0, 400, 50, 50], [255, 0, 255]]  and color
  args.outputs.borders << border_with_nested_color_and_rect
  args.outputs.solids  << border_with_nested_color_and_rect
end
def border_as_solid_and_solid_as_border args border = [ 0 , 0 , 50 , 50 ] args . outputs . borders << border args . outputs . solids << border border_with_color = [ 0 , 100 , 50 , 50 , 255 , 0 , 0 ] args . outputs . borders << border_with_color args . outputs . solids << border_with_color border_with_nested_color = [ 0 , 200 , 50 , 50 , [ 0 , 255 , 0 ] ] args . outputs . borders << border_with_nested_color args . outputs . solids << border_with_nested_color border_with_nested_rect = [ [ 0 , 300 , 50 , 50 ] , 0 , 0 , 255 ] args . outputs . borders << border_with_nested_rect args . outputs . solids << border_with_nested_rect border_with_nested_color_and_rect = [ [ 0 , 400 , 50 , 50 ] , [ 255 , 0 , 255 ] ] args . outputs . borders << border_with_nested_color_and_rect args . outputs . solids << border_with_nested_color_and_rect end
Shows a border being output onto the screen as a border and a solid
Also shows how colors can be set
Shows a border being output onto the screen as a border and a solid Also shows how colors can be set
# Red, green, blue saturations (last three parameters) can be any number between 0 and 255 # nested color # nested rect # nested rect and color
args