README.md in podoff-1.2.4 vs README.md in podoff-1.3.0

- old
+ new

@@ -235,29 +235,55 @@ def insert_contents(obj_or_ref) ``` ### Podoff::Stream -TODO +Here are the methods used to write to streams. ```ruby class Podoff::Stream # set the current font and font size for the stream # def tf(font_name, font_size) - alias :font :tf + alias font tf # set the current color for the stream # def rg(red, green, blue) - alias :rgb :rg - alias :color :rg + def rg(string) # like '#fffff' or 'white' + alias rgb rg + alias color rg # write a piece of text at a given position # def bt(x, y, text) - alias :text :bt + def bt(x, y, text, rgb: 'blue') + alias text bt + + # draw a rectangle + # + def re(x, y, *a) + alias rect re + alias rectangle re + # + st.re(10, 20, 30, 40, rgb: [ 0.0, 0.0, 0.0 ]) + st.rect(11, 21, w: 31, h: 41, rgb: [ 0.1, 0.1, 0.1 ]) + st.rectangle(12, 22, 32, 42, rgb: [ 0.2, 0.2, 0.2 ]) + # ... + + # draw a line + # + def line(x0, y0, x1, y1, *a) + # + st.line(1, 1, 2, 2) + st.line(1, 1, 2, 2, 3, 3) + st.line([ 1, 1 ], [ 2, 2 ], [ 3, 3 ]) + st.line([ 1, 1 ], [ 2, 2 ], [ 3, 3 ], rgb: [ 0.5, 0.5, 0.5 ]) + st.line(1, 1, 2, 2, rgb: [ 0.7, 0.7, 0.7 ]) + # ... + st.line(1, 1, 2, 2, rgb: [ 0.7, 0.7, 0.7 ], width: 0.3) + # ... ``` ## disclaimer