import javax.servlet.*; import javax.servlet.http.*; import com.sun.image.codec.jpeg.*; import java.awt.image.*; import java.awt.*; import java.io.*; import java.util.Vector; import ee.tpu.hk.links.DiagramFunc; public class diagramm extends HttpServlet { private DiagramFunc stiilid = new DiagramFunc(); public void doGet(HttpServletRequest kysimus, HttpServletResponse vastus) throws IOException, ServletException{ String userid =kysimus.getParameter("userid"); Vector st =new Vector(5); st = stiilid.allStyles(); st.trimToSize(); BufferedImage pilt =new BufferedImage(400, 300, BufferedImage.TYPE_INT_RGB); Graphics2D piltg=pilt.createGraphics(); piltg.setColor(Color.white); piltg.fillRect(0,0,400,300); piltg.setColor(Color.black); piltg.drawLine(100,20,350,20); piltg.drawLine(100,20,100,250); piltg.drawString("0 %",100,10); piltg.drawString("100 %",320,10); int y=50; int x =10; float stiilipr=0; //mittu % oli mingi stiili plaate float xpr; for(int i = 0;i