@@ -43,14 +43,25 @@ func (p *Pad) NoutRefresh(py, px, sy, sx, h, w int) error {
43
43
// Refresh will calculate how to update the physical screen in the most
44
44
// efficient manor and update it. See Window.Refresh for more details.
45
45
// The coordinates py, px specify the location on the pad from which the
46
- // characters we want to display are located. sy and sx specify the location
47
- // on the screen where this data should be displayed. h and w are the height
48
- // and width of the rectangle to be displayed. The coordinates and the size
49
- // of the rectangle must be contained within both the Pad's and Window's
50
- // respective areas
51
- func (p * Pad ) Refresh (py , px , sy , sx , h , w int ) error {
52
- if C .prefresh (p .win , C .int (py ), C .int (px ), C .int (sy ), C .int (sx ),
53
- C .int (h ), C .int (w )) != C .OK {
46
+ // characters we want to display are located. sy1 and sx1 specify the location
47
+ // on the screen where this data should be displayed, hence the upper left
48
+ // corner of the display area on the screen. sy2 and sx2 specify the location
49
+ // of the lower right corner of the display area on the screen:
50
+ //
51
+ // (y1,x1) +-------------+
52
+ // | |
53
+ // | |
54
+ // | |
55
+ // | |
56
+ // | |
57
+ // | |
58
+ // +-------------+ (y2, x2)
59
+ //
60
+ // The coordinates of the rectangle must be contained within both the Pad's
61
+ // and Window's respective areas.
62
+ func (p * Pad ) Refresh (py , px , sy1 , sx1 , sy2 , sx2 int ) error {
63
+ if C .prefresh (p .win , C .int (py ), C .int (px ), C .int (sy1 ), C .int (sx1 ),
64
+ C .int (sy2 ), C .int (sx2 )) != C .OK {
54
65
return errors .New ("Failed to refresh pad" )
55
66
}
56
67
return nil
0 commit comments