The example of this article tells the way Java implements pictures to high -definition fonts and borders. Share it for everyone for your reference. The specific implementation method is as follows:
Graphics2g G2 = Image.creategraphics (); // G2.SetRenderingHint (renderinghints.Key_text_antialiasing, renderinghints.value_antialias_on); G2 .setRenderinghint (renderinghints.Key_antialiasing, RenderingHints.Value_antialias_ON); g2.setRenderingHint (renderinghints.Key_antialiasing, Renderingering Hints.value_antialias_on); g2.setRenderinghint (renderingHints.Key_Stroke_Control, RenderingHints.Value_Stroke_pure); Inghints.Value_Color_render_quality); // shadowgraphics.setRendering (renderinghints.key_alpha_interpolation LATION_QUALITY); TextLayout Tl = New TextLayout ; G2.SETSTROKE (New Basicstroke (3.0F)); g2.SetColor (color.white); g2.Draw (sha); g2.SetColor (color.black); g2.fill (sHA); g2.dispose ();
It is hoped that this article is helpful to everyone's Java program design.