Method: Processing::GraphicsContext#background
- Defined in:
- lib/processing/graphics_context.rb
#background(str) ⇒ nil #background(str, alpha) ⇒ nil #background(gray) ⇒ nil #background(gray, alpha) ⇒ nil #background(r, g, b) ⇒ nil #background(r, g, b, alpha) ⇒ nil
Clears screen.
1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 |
# File 'lib/processing/graphics_context.rb', line 1466 def background(*args) assertDrawing__ rgba = toRGBA__(*args) if rgba[3] == 1 @painter__.background(*rgba) else @painter__.push fill: rgba, stroke: :none, blend_mode: :replace do |_| @painter__.rect 0, 0, width, height end end nil end |