class BBS::Petscii::Canvas::Output::Pen
The colour and reverse video sent so far while cells go out.
Attributes
Whether reverse video is on.
Public Class Methods
Source
# File lib/bbs/petscii/canvas/output.rb, line 64 def initialize @color = nil @rvs = false end
A pen with no colour sent and reverse video off.
Public Instance Methods
Source
# File lib/bbs/petscii/canvas/output.rb, line 82 def close(out) out << RVS_OFF if @rvs out end
Turns reverse video off at the end of out when it is on. Returns out.
Source
# File lib/bbs/petscii/canvas/output.rb, line 71 def emit(out, cells) cells.each do |cell| visible = cell.visible? color(out, cell.color) if visible && cell.color reverse(out, cell.rvs) if visible || @rvs out << cell.code end end
Appends the codes of cells to out, with the colour and RVS codes each needs: an invisible cell takes no colour.