You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Petrenko (JIRA)" <ji...@apache.org> on 2007/10/18 16:53:50 UTC
[jira] Resolved: (HARMONY-4825) [classlib][awt] Can not use XORMode
to erase what was drawn previously
[ https://issues.apache.org/jira/browse/HARMONY-4825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko resolved HARMONY-4825.
--------------------------------------
Resolution: Fixed
Actually Chunrong was interested in XOR mode for graphics primitives not for text.
So the issue was fixed for primitives.
The patch has been appiled.
Please verify.
> [classlib][awt] Can not use XORMode to erase what was drawn previously
> ----------------------------------------------------------------------
>
> Key: HARMONY-4825
> URL: https://issues.apache.org/jira/browse/HARMONY-4825
> Project: Harmony
> Issue Type: Sub-task
> Components: Classlib
> Environment: Win32
> Reporter: Chunrong Lai
> Assignee: Alexey Petrenko
> Priority: Critical
> Attachments: Harmony.JPG, RI.JPG
>
>
> A common trick in XORMode is to draw something, in XORMode, a second time to erase what was drawn the first time. But this does not work in Harmony to me. See below reproducer:
> import java.awt.*;
> import javax.swing.*;
> public class DrawStringTest extends JFrame {
> int xPosition = 100;
> int yPosition = 100;
> public static void main(String[] args){
> DrawStringTest aTest = new DrawStringTest();
> aTest.setSize(800, 600);
> aTest.show();
> }
> public DrawStringTest(){}
> public void paint(Graphics g){
> super.paint(g);
> System.out.println("drawString at " + xPosition + ", " + yPosition);
> g.drawString("XOR mode drawString test", xPosition, yPosition);
> g.setXORMode(getBackground());
> for (int i = 0; i < 5; i ++) {
> g.drawString("XOR mode drawString test", xPosition, yPosition);
> //used to erase what was drawn previously
> xPosition += 100;
> yPosition += 100;
> if (xPosition > 600) xPosition = 100;
> if (yPosition > 400) yPosition = 100;
> g.drawString("XOR mode drawString test", xPosition, yPosition);
> }
> g.setPaintMode();
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.