This site requires JavaScript, please enable it in your browser!
Greenfoot back
Upupzealot
Upupzealot wrote ...

2014/2/4

How can I contribute my translation in Chinese?

1
2
Upupzealot Upupzealot

2014/2/10

#
davmac davmac

2014/2/10

#
It looks fine to me. Here is the source of the method:
    /**
     * Mirrors the image horizontally (the left of the image becomes the right, and vice versa).
     * 
     */
    public void mirrorHorizontally()
    {
        AffineTransform tx = AffineTransform.getScaleInstance(-1, 1);
        tx.translate(-image.getWidth(null), 0);
        AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
        setImage(op.filter(image, null));
    }
As you can see it is fairly simple and straightforward. The AffineTransform 'tx' flips the image around the Y-axis (so, flips it horizontally), and the 'op' transform then adjusts the position so that the flipped image covers the original image space. It's possible that there is a bug in your graphics drivers, or in Java, that is causing this issue on your machine. As I say, the problem does not occur on my machine.
Upupzealot Upupzealot

2014/2/10

#
Maybe you are right. I use
Graphics2D g2d = (Graphics2D)buffer.getAwtImage().getGraphics();
                g2d.translate(buffer.getWidth(), 1);
                g2d.scale(-1, 1);
                g2d.drawImage(source.getAwtImage(), 0, 0, null);
in my project.
danpost danpost

2014/2/10

#
nccb investigated this red tint issue in this discussion.
Upupzealot Upupzealot

2014/2/11

#
@danpost thx, I would dig the color problem later. @davmac another spell mistake in API, UserInfo Class, setString method. The first world may be "Set".
Upupzealot Upupzealot

2014/2/11

#
An other question for my own. Why in Class UserInfo, the doc was using the word "function" instead of "method" as always. Is there a difference? Or just because nccb loves the word function.
davmac davmac

2014/2/11

#
I don't think there's any difference intended.
Upupzealot Upupzealot

2014/2/20

#
@davmac Done! Check the email please~
davmac davmac

2014/2/20

#
Received, thanks!
Upupzealot Upupzealot

2014/2/22

#
would this be shown in the translation page?
davmac davmac

2014/2/24

#
Upupzealot Upupzealot

2014/2/25

#
Thx.
You need to login to post a reply.
1
2