ABOUT US

|

SUPPORT

|

BLOG

DOWNLOADS    

 

 

 

 


 

 

Rendering Optimizations

 

 

 

 

 

 

The RenderingOptimization class allows settings to be made which affect the way web pages are rendered. These can be used to modify the speed and detail of the rendering.

Anti-aliasing

Options are available to use anti-aliasing in the rendering of web pages. There are seperate options for graphics and text. The anti-aliasing is not enabled by default for general rendering and can be set using the following function:

        RenderingOptimization.setAntiAliasing(boolean antiAlias);

The anti-aliasing for text has three different settings.

TEXT_ANTIALIAS_OFF      - No anti-aliasing is used on text.
TEXT_ANTIALIAS_AUTO     - Anti-aliasing is only used on text of a certain point size and above. This makes large fonts appear smoother and small fonts easy to read. The font point size is that used in java.awt.Font, which is measured in pixels, or 1/72 inch units. This threshold is set to 14 point by default.
 
TEXT_ANTIALIAS_ALL      - Anti-aliasing is used on all text.

This is set by using the following function:
        RenderingOptimization.setTextAntiAliasing(int textAntiAliasing);
 
Note: By default this is set to TEXT_ANTIALIAS_ALL on Mac OSX and TEXT_ANTIALIAS_AUTO on all other systems.
 
If the TEXT_ANTIALIAS_AUTO option is used, the threshold size can be changed from the default value of 14 to the required value using the following function:

        RenderingOptimization.setAntiAliasTextAutoThreshold(int antiAliasTextAutoThreshold);

Example usage:

        IMozillaBrowserCanvas browser = new IMozillaBrowserCanvas();

        ...
        RenderingOptimization renOps = new RenderingOptimization();
        renOps.setSmoothPluginScrolling(true);
        renOps.setWindowlessFlashSmoothScrolling(true);
        renOps.setAntiAliasing(true);
        renOps.setAntiAliasTextAutoThreshold(12);

        browser.setRenderingOptimizations(renOps);

 

 

 

 

 

 

 

 

Copyright � JadeLiquid Software - www.jadeliquid.com