RenderingHints parameters

xiaoxiao2021-03-06  80

The RenderingHints class defines a variety of coloring fine tuning, which stores in a map set of Graphics2D objects. The parameter of the setRenderingHint () method is a key and the corresponding key value. In our code, the first parameter is a key representing the fine tuning of Alpha, and the second parameter is the fine-tuning value. The fine-tuning other possible values ​​have value_alpha_interpolation_default, representation of the platform default; and value_alpha_interpolation_speed, representing the pursuit speed rather than quality.

You can also provide fine-tuning for the following keys:

Key Description Key_antialiasing decides whether to use anti-aliasing. When the colored lines are tilted angles, a set of stepped pixels are usually obtained, so that this line is unexpected, often referred to as a zigzag pattern. Anti-aliasing is a technology that sets the pixel brightness of the line of the tilt angle to make the line look smoother. Therefore, this fine-tuning is to determine whether it takes time to reduce the jagged pattern when the line is tilted. Possible values ​​have value_ntialias_on, _off or _default. Key_Color_Rendering method controls the color coloration. Possible values ​​have value_color_render_speed, _quality or _default. Key_Dithering controls how to handle jitter. Jitter is a larger color process for synthesizing a large number of colors in a set of limited colors, which are colored to neighboring pixels to produce new color illusions that are not in this group of colors. Possible values ​​have value_dither_enable, _disable or _default. Key_Fractionalmetrics Controls Quality of Display Text. Possible values ​​have value_fraactionalmetrics_on, _off or _default. KEY_INTERPOLATION determines how to do an interpolation. When modificing a source image, the thix of the deformation is rarely in the corresponding target pixel position. In this case, the color value of the pixels after each deformation has to be determined by the surrounding pixels. Interpolation is to achieve the above process. There are many technologies available. Possible values, by processing time from the least to least, is value_interpolation_bicubic, _bilinear or _nearest_neighbor. Key_Rendering determines coloring technology to trade between speed and quality. Possible values ​​have value_rendering_speed, _quality or _default. Key_Text_antialiasing determines whether it is resistant to the text color. Possible values ​​have value_text_antialiasing_on, _off or _default.

We have been far enough. Let's go back to draw Sprite ...

转载请注明原文地址:https://www.9cbs.com/read-93099.html

New Post(0)