Render graphics using Doubles in Graphics2D
        Posted  
        
            by 
                thedeadlybutter
            
        on Game Development
        
        See other posts from Game Development
        
            or by thedeadlybutter
        
        
        
        Published on 2012-12-06T04:14:44Z
        Indexed on 
            2012/12/06
            11:36 UTC
        
        
        Read the original article
        Hit count: 353
        
Currently, I have a JFrame for my game to render in, and I'm using Graphics2D for drawing (The games graphics are fairly simple 2D sprites). However, my delta variable is a double, and all of the Graphics 2D methods (And Grpahics) use int. I tried to type cast the delta to an int, but it just rounds down to 0. So my question is, how can I render graphics using Graphics2D in Java with coordinates that are doubles. Can I convert it to work with Graphics2D if there is no built in way? Or, is there a graphics library that can support doubles for coordinates?
© Game Development or respective owner