computor Posted December 18, 2014 Posted December 18, 2014 Is there a way to add a stroke around your font in a paint?? This is an example:
TheScrub Posted December 18, 2014 Posted December 18, 2014 http://docs.oracle.com/javase/tutorial/2d/advanced/transforming.html 1
computor Posted December 18, 2014 Author Posted December 18, 2014 (edited) ...thanks Edited December 18, 2014 by computor
Czar Posted December 19, 2014 Posted December 19, 2014 (edited) If you are truly stuck, there's a trick to achieving strokes and shadows in paint without any fancy stuff by drawing the text with the stroke color, then drawing the text again with a different color on top of it. Usually, for shadows I just draw the text again with an offset of 1 pixel, so: String msg = "Hello"; int x = 15, y = 15; g.setColor(Color.BLACK); drawString(msg, x + 1, y + 1); g.setColor(Color.RED); drawString(msg, x, y); Thats for a basic shadow, however if you want a full stroke (like you mentioned in your thread) you must make additions to the above code so that it draws in every direction, not just + 1, example drawString(msg, x + 1, y + 1); drawString(msg, x, y + 1); drawString(msg, x + 1, y); however, from the looks of it, its drawing too many strings! So only use this if you are hopeless, it's really not that bad but its better than nothing. Edited December 19, 2014 by Czar