--*********************************************************** --** THE INDIE STONE ** --** Author: turbotutone ** --*********************************************************** require "ISUI/ISPanel" FloatArrayPlotter = ISPanel:derive("FloatArrayPlotter"); function FloatArrayPlotter:initialise() ISPanel.initialise(self); self.plotColor = {r=0,g=1,b=0,a=1}; end function FloatArrayPlotter:createChildren() end function FloatArrayPlotter:update() ISPanel.update(self); end function FloatArrayPlotter:prerender() ISPanel.prerender(self); end function FloatArrayPlotter:render() ISPanel.render(self); local w = self:getWidth(); local h = self:getHeight(); local c; for i=1,#self.horzBars do c = self.horzBars[i].col; self:drawRect(1, h*self.horzBars[i].val, w-2, 1, c.a, c.r, c.g, c.b); end if self.data then local c = self.plotColor; local w = w-2; local last = false; local dy, dh; for i=0,self.data:size() do local val = self.data:get(i); dy = self.height-(val*self.height); dh = 1; if last and i>=1 then if last>val then dy = self.height-(last*self.height); dh = (last*self.height)-(val*self.height); elseif last