Package org.geotools.renderer.label.LabelCacheItem

Examples of org.geotools.renderer.label.LabelCacheItem.GraphicResize


            Rectangle2D area = labelItem.getTextStyle().getGraphicDimensions();
            // center the graphics on the labels back
            Rectangle2D shieldBounds;
            // handle the image resizing and margins
            int[] margin = labelItem.getGraphicMargin();
            GraphicResize mode = labelItem.getGraphicsResize();
            if (mode == GraphicResize.STRETCH) {
                // it's really the label bounds + margin
                shieldBounds = applyMargins(margin, bounds);
            } else if (mode == GraphicResize.PROPORTIONAL) {
                // the shield will be inflated in proportion to its size
View Full Code Here


     * Resizes the graphic according to the resize mode, label size and margins
     * @param graphic
     * @return
     */
    private Style2D resizeGraphic(Style2D graphic) {
        final GraphicResize mode = labelItem.graphicsResize;
       
        // if no resize, nothing to do
        if(mode == GraphicResize.NONE || mode == null) {
            return graphic;
        }
View Full Code Here

TOP

Related Classes of org.geotools.renderer.label.LabelCacheItem.GraphicResize

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.