Color color = PropertyUtil.getColor(style.getProperty(StyleConstants.STYLE_COLOR)); if (null != color) { contentByte.setColorFill(color); }
		protected void drawTextAt( ITextArea text, int textX, int textY, 				PdfContentByte contentByte, float contentByteHeight )		{	 			IStyle style = text.getStyle();			assert style!=null; 					    //style.getFontVariant();     	small-caps or normal		    //FIXME does NOT support small-caps now			float fontSize = text.getFontInfo().getFontSize();			float characterSpacing = pdfMeasure( PropertyUtil.getDimensionValue(		        	style.getProperty(StyleConstants.STYLE_LETTER_SPACING)) );			float wordSpacing = pdfMeasure( PropertyUtil.getDimensionValue(		        	style.getProperty(StyleConstants.STYLE_WORD_SPACING)) );			contentByte.saveState();			//start drawing the text content			contentByte.beginText();		    			contentByte.setFontAndSize(text.getFontInfo().getBaseFont(), fontSize); 			contentByte.setCharacterSpacing(characterSpacing);			contentByte.setWordSpacing(wordSpacing);		       		    placeText(contentByte, text.getFontInfo(), layoutAreaX2PDF(textX), 		    		layoutAreaY2PDFEx(textY, text.getFontInfo().getBaseline(), contentByteHeight));		    		    Color color = PropertyUtil.getColor(style.getProperty(StyleConstants.STYLE_COLOR));		    if (null != color)		    {		    	contentByte.setColorFill(color);		    }		   		    contentByte.showText(text.getText());		    contentByte.endText();		    contentByte.restoreState();		        			//draw the overline,throughline or underline for the text if it has any. 		    			if ( IStyle.LINE_THROUGH_VALUE.equals( style					.getProperty( IStyle.STYLE_TEXT_LINETHROUGH ) ) )			{				drawLine(						layoutPointX2PDF( textX ),						layoutPointY2PDF( textY								+ text.getFontInfo( ).getLineThroughPosition( ) ),						layoutPointX2PDF( textX + text.getWidth( ) ),						layoutPointY2PDF( textY								+ text.getFontInfo( ).getLineThroughPosition( ) ),						text.getFontInfo( ).getLineWidth( ),						PropertyUtil.getColor( style								.getProperty( StyleConstants.STYLE_COLOR ) ),						"solid", contentByte ); //$NON-NLS-1$			}			if ( IStyle.OVERLINE_VALUE.equals( style					.getProperty( IStyle.STYLE_TEXT_OVERLINE ) ) )			{				drawLine( layoutPointX2PDF( textX ), layoutPointY2PDF( textY						+ text.getFontInfo( ).getOverlinePosition( ) ),						layoutPointX2PDF( textX + text.getWidth( ) ),						layoutPointY2PDF( textY								+ text.getFontInfo( ).getOverlinePosition( ) ),						text.getFontInfo( ).getLineWidth( ),						PropertyUtil.getColor( style								.getProperty( StyleConstants.STYLE_COLOR ) ),						"solid", contentByte ); //$NON-NLS-1$			}			if ( IStyle.UNDERLINE_VALUE.equals( style					.getProperty( IStyle.STYLE_TEXT_UNDERLINE ) ) )			{				drawLine(						layoutPointX2PDF( textX ),						layoutPointY2PDF( textY								+ text.getFontInfo( ).getUnderlinePosition( ) ),						layoutPointX2PDF( textX + text.getWidth( ) ),						layoutPointY2PDF( textY								+ text.getFontInfo( ).getUnderlinePosition( ) ),						text.getFontInfo( ).getLineWidth( ),						PropertyUtil.getColor( style								.getProperty( StyleConstants.STYLE_COLOR ) ),						"solid", contentByte ); //$NON-NLS-1$			} 		}