Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich2005-01-26 18:16:18 +0000
committerFelipe Heidrich2005-01-26 18:16:18 +0000
commit1a5ca70f905a51b34ddd34368679ad8c2e2127ee (patch)
treec14549b01d06a4389f325ce19895d2708e020703
parenta10dbcc9ee33a985d2920cf431ec185a353fd9fd (diff)
downloadeclipse.platform.swt-1a5ca70f905a51b34ddd34368679ad8c2e2127ee.tar.gz
eclipse.platform.swt-1a5ca70f905a51b34ddd34368679ad8c2e2127ee.tar.xz
eclipse.platform.swt-1a5ca70f905a51b34ddd34368679ad8c2e2127ee.zip
83546
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
index d46ca48bf0..8294ba0a1c 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/StyledText.java
@@ -191,6 +191,7 @@ public class StyledText extends Canvas {
int endLine; // last (wrapped) line to print
boolean singleLine; // widget single line mode
Point selection = null; // selected text
+ boolean mirrored; //indicates the printing gc should be mirrored
/**
* Creates an instance of <class>Printing</class>.
@@ -207,6 +208,7 @@ public class StyledText extends Canvas {
this.parent = parent;
this.printer = printer;
this.printOptions = printOptions;
+ this.mirrored = (parent.getStyle() & SWT.MIRRORED) != 0;
singleLine = parent.isSingleLine();
startPage = 1;
endPage = Integer.MAX_VALUE;
@@ -421,8 +423,8 @@ public class StyledText extends Canvas {
clientArea.height -= (clientArea.y + trim.height);
// make the orientation of the printer gc match the control
- int mask = SWT.RIGHT_TO_LEFT | SWT.LEFT_TO_RIGHT;
- gc = new GC(printer, parent.getStyle() & mask);
+ int style = mirrored ? SWT.RIGHT_TO_LEFT : SWT.LEFT_TO_RIGHT;
+ gc = new GC(printer, style);
gc.setFont(printerFont);
renderer = new PrintRenderer(
printer, printerFont, gc, printerContent,

Back to the top