This article describes the Java implementation of the image written in HD fonts and border with the method. Share to everyone for your reference. The implementation method is as follows:
graphics2d g2=image.creategraphics ()//g2.setrenderinghint (renderinghints.key_text_
ANTIALIASING,RENDERINGHINTS.VALUE_TEXT_ANTIALIAS_ON);
G2.setrenderinghint (renderinghints.key_antialiasing,renderinghints.value_antialias_on);
G2.setrenderinghint (renderinghints.key_antialiasing, renderinghints.value_antialias_on);
G2.setrenderinghint (Renderinghints.key_stroke_control, renderinghints.value_stroke_pure);
G2.setrenderinghint (renderinghints.key_color_rendering, renderinghints.value_color_render_quality); Shadowgraphics.setrenderinghint (Renderinghints.key_alpha_interpolation, Renderinghints.value_alpha_
interpolation_quality);
FontRenderContext FRC = G2.getfontrendercontext ();
TextLayout tl = new textlayout ("URL:", New Font ("Song Body", font.plain,14), FRC);
Shape sha = Tl.getoutline (Affinetransform.gettranslateinstance (5,25));
G2.setstroke (New Basicstroke (3.0f));
G2.setcolor (Color.White);
G2.draw (SHA);
G2.setcolor (Color.Black);
G2.fill (SHA);
G2.dispose ();
I hope this article will help you with your Java programming.