object BitmapOps { def bresenham(bm:RgbBitmap, x0:Int, y0:Int, x1:Int, y1:Int, c:Color)={ val dx=math.abs(x1-x0) val sx=if (x0dy) dx else -dy)/2 def next={ val res=(x,y) val e2=err; if (e2 > -dx) {err-=dy; x+=sx} if (e2