common:textRender

This tag creates a image from a string. I can cope with a lot of parameters.

Parameters

Name Required Default Type Description
id false   String The result variable name.
propertyName false   String If stated the tag looks at this binding for a configuration content which defines all the parameters below in attributes. Nice if you wish to reuse a few rendering profile but you don't want to hard code it in the templates.
contentId false   Object/String If stated the tag looks at this content as a configuration content which defines all the parameters below in attributes. Nice if you wish to reuse a few rendering profile but you don't want to hard code it in the templates.
text false   Object/String The text we want to render.
imageType false BufferedImage.TYPE_4BYTE_ABGR Object/String What kind of image do we want – look
at BufferedImage.TYPE_XXX for the available types.
fontName false Dialog Object/String The name of the font to use
fontStyle false Font.PLAIN Object/String Which style to use
fontSize false 18 Object/String The size of the font
fgColor false Black Object/String What color should the text have – colon separated RGBA-color
bgColor false White Object/String What color should the background have – colon separated RGBA-color
renderWidth false 200 Object/String How wide is the render canvas in pixels
align false left Object/String How should the text align: left, right or center
padTop false 4 Object/String If stated the text will have x pixels of padding above it
padBottom false 4 Object/String If stated the text will have x pixels of padding below it
padLeft false 4 Object/String If stated the text will have x pixels of padding left of it
padRight false 4 Object/String If stated the text will have x pixels of padding right of it
pad false   Object/String If stated the text will have x pixels of padding around it
maxRows false 20 Object/String

State the maximum numbers of rows the tag can extend the rendering to.

trimEdges false 0 Object/String Should the edges be trimmed or not.
0 = notrim, 1 = left, 2 = right, 3 = left and right
tileBackgroundImage false 0 Object/String State if the background image should
be tiled. 0 = no, 1 = horizontal, 2 = vertical, 3 = both
backgroundImageUrl false   Object/String The url of the background image to be used.
         

 

ID-result variable contains: A String-object representing the image-url.

Examples

This very simple example just renders a simple text with all the default settings except that we trim both sides and we then show it in a image-tag.
<common:textRender id="titleImageUrl" text="InfoGlue is cool" trimEdges="3"/> <img src="<c:out value="${titleImageUrl}"/>"/>



comments powered by Disqus