Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 225539
Collapse All | Expand All

(-)src/org/eclipse/birt/sample/reportitem/rotatedtext/util/GraphicsUtil.java (-2 / +6 lines)
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *  Actuate Corporation  - initial API and implementation
9
 *  Actuate Corporation  - initial API and implementation
10
 *  IBM Corporation  - Bidi direction of text
10
 *******************************************************************************/
11
 *******************************************************************************/
11
12
12
package org.eclipse.birt.sample.reportitem.rotatedtext.util;
13
package org.eclipse.birt.sample.reportitem.rotatedtext.util;
Lines 91-97 Link Here
91
	   *         Note: Only one of the style UP or DOWN may be specified. 
92
	   *         Note: Only one of the style UP or DOWN may be specified. 
92
	   *         </p> 
93
	   *         </p> 
93
	   */ 
94
	   */ 
94
	  public  Image createRotatedText(String text, Integer angle ) 
95
	  public Image createRotatedText( String text, Integer angle, boolean rtl ) 
95
	  {
96
	  {
96
	  	
97
	  	
97
98
Lines 121-127 Link Here
121
		    stringImage = new Image(display, pt.x, pt.y); 
122
		    stringImage = new Image(display, pt.x, pt.y); 
122
	
123
	
123
		    // Create a gc for the image 
124
		    // Create a gc for the image 
124
		    gc = new GC(stringImage); 
125
		    if ( rtl )
126
				gc = new GC( stringImage, SWT.RIGHT_TO_LEFT );
127
			else
128
				gc = new GC( stringImage, SWT.LEFT_TO_RIGHT ); 
125
		    
129
		    
126
		    // Draw the text onto the image 
130
		    // Draw the text onto the image 
127
		    gc.drawText(text, 0, 0); 
131
		    gc.drawText(text, 0, 0); 
(-)src/org/eclipse/birt/sample/reportitem/rotatedtext/RotatedTextPresentationImpl.java (-2 / +4 lines)
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *  Actuate Corporation  - initial API and implementation
9
 *  Actuate Corporation  - initial API and implementation
10
 *  IBM Corporation  - Bidi direction of text
10
 *******************************************************************************/
11
 *******************************************************************************/
11
12
12
package org.eclipse.birt.sample.reportitem.rotatedtext;
13
package org.eclipse.birt.sample.reportitem.rotatedtext;
Lines 158-165 Link Here
158
		
159
		
159
		
160
		
160
		
161
		
161
		 graphicsUtil = new GraphicsUtil();
162
		graphicsUtil = new GraphicsUtil();
162
		org.eclipse.swt.graphics.Image rotatedImage = graphicsUtil.createRotatedText(text, angle);
163
		org.eclipse.swt.graphics.Image rotatedImage = graphicsUtil
164
				.createRotatedText( text, angle, modelHandle.isDirectionRTL( ) );
163
		
165
		
164
		// Test
166
		// Test
165
		ImageLoader imageLoader = new ImageLoader();
167
		ImageLoader imageLoader = new ImageLoader();

Return to bug 225539