Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
require 'curses'
#===============================================================================
#
# Class: LegacyGraphics
#
class LegacyGraphics < Curses::Window
def initialize(height, width, y, x, gy = 400, gx = 640, cy = 16, cx = 8)
@x = width
@y = height
@gx = gx
@gy = gy
@cx = cx
@cy = cy
super(height, width, y, x)
end
#---------------------------------------------------------------------------
#
# pset
#
def pset(x, y, c)
self.setpos(y * @y / @gy, x * @x / @gx)
self.addch(c.class <= Numeric ? ' 1234567'[c] : c)
end
#---------------------------------------------------------------------------
#
# locate
#
def locate(x, y)
self.setpos(y * @cy * @y / @gy, x * @cx * @x / @gx)
end
#---------------------------------------------------------------------------
#
# print
#
def print(mes)
self.addstr(mes)
end
#---------------------------------------------------------------------------
#
# line
#
def line(x1, y1, x2, y2, c)
# not implement yet
end
end