summaryrefslogtreecommitdiff
path: root/gnu/java/awt
diff options
context:
space:
mode:
authorRobert Schuster <theBohemian@gmx.net>2007-05-25 11:11:14 +0000
committerRobert Schuster <theBohemian@gmx.net>2007-05-25 11:11:14 +0000
commit380352eba8eea0b969fc771702dba36254316287 (patch)
treebbad54d930aa8f3f6b151f7dbab061270afd0d3e /gnu/java/awt
parent62bcaaa22ba2e718349491b7f2f62f1b864fb932 (diff)
downloadclasspath-380352eba8eea0b969fc771702dba36254316287.tar.gz
2007-05-25 Robert Schuster <robertschuster@fsfe.org>
* gnu/java/awt/peer/x/XGraphics2D.java: (rawDrawLine): Added addition of translation. (rawFillRect): Dito.
Diffstat (limited to 'gnu/java/awt')
-rw-r--r--gnu/java/awt/peer/x/XGraphics2D.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/gnu/java/awt/peer/x/XGraphics2D.java b/gnu/java/awt/peer/x/XGraphics2D.java
index 77f4760bf..3e0fe9499 100644
--- a/gnu/java/awt/peer/x/XGraphics2D.java
+++ b/gnu/java/awt/peer/x/XGraphics2D.java
@@ -94,12 +94,15 @@ public class XGraphics2D
protected void rawDrawLine(int x0, int y0, int x1, int y1)
{
- xdrawable.segment(xgc, x0, y0, x1, y1);
+ int tx = (int) transform.getTranslateX();
+ int ty = (int) transform.getTranslateY();
+ xdrawable.segment(xgc, x0 + tx, y0 + ty, x1 + tx, y1 + ty);
}
protected void rawFillRect(int x, int y, int w, int h)
{
- xdrawable.rectangle(xgc, x, y, w, h, true);
+ xdrawable.rectangle(xgc, x + (int) transform.getTranslateX(),
+ y + (int) transform.getTranslateY(), w, h, true);
}
/**
@@ -317,4 +320,7 @@ public class XGraphics2D
}
return ret;
}
+
+
}
+