graphics2d
How to make pixel perfect Line2D in - Graphics2D
G\'day, I have JPanel with some Line2D objects on it. Issue is when I draw this line it doesn\'t appear as I want them to. Lines are not smooth, It\'s hard to 开发者_如何学运维explain in word so I am[详细]
2023-04-02 19:33 分类:问答How to animate Rectangle on a Path2D object in Graphics2D context
I have just started learning basics a开发者_JAVA百科bout Graphics2D class, So far I am able to draw different objects and implements ActionListener to actually move them on screen by onKeyPress. So fa[详细]
2023-03-31 14:51 分类:问答VolatileImage JFrame on multiple screens
I have a JFrame in which I am using Graphics2D to draw a VolatileImage using this tutorial. I have mainly copied the code to see how it works, but have slightly edited it for my game. I am running my[详细]
2023-03-31 02:06 分类:问答Resize drawing to match frame size
I\'ve written an app that custom draws everything inside paint() based on fixed pixel positions.Then I disabled resize of the frame so its always visible.[详细]
2023-03-29 02:07 分类:问答Painting pixels images in Java
Which method is the best way to create a pixel image with java. Say, I want to create a pixel image with th开发者_运维问答e dimensions 200x200 which are 40.000 pixels in total. How can I create a pixe[详细]
2023-03-28 00:51 分类:问答What buffering strategy should I use for my 2D scrolling map?
So, I\'m creating a 2d top-down game in Java. I\'m following instructions from Java 2D: Hardware Accelerating - Part 2 - Buffer Strategies to take advantage of hardware acceleration.[详细]
2023-03-27 16:14 分类:问答Scaling diagrams in Java to fit one print page
I have a diagramming tool that uses Java and Graphics2D.I would like to scale the resulting diagram so it fits exactly into an 8.5 x 11 page (landscape) when printing.[详细]
2023-03-22 06:32 分类:问答Using DecimalFormat (force dot) and drawString() (y seems to be wrong)
Two questions in one, but I have a very short test case demonstrating my problems: import java.awt.*; import java.awt.image.*;[详细]
2023-03-20 04:33 分类:问答Convert a Graphics2D to an Image or BufferedImage
I have a little problem here.开发者_开发技巧 I have an applet, where user can \"draw\" inside it. To do that, I use the java.awt.Graphics2D.[详细]
2023-03-17 18:20 分类:问答Graphics2D draw image inside of defined quadrilateral
I cannot find a draw image overload inside of Graphics2D which will enable me to perform such a task, can someone help me figure out how one might do this - preferably without swapping to more advance[详细]
2023-03-15 14:02 分类:问答