A possible fix for someone who is having problems with the card flipping:
http://forums.puzzlepirates.com/community/mvnforum/viewthread?thread=30539&firstunread=yes git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3815 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -339,12 +339,16 @@ public class CardSprite extends OrientableImageSprite
|
|||||||
// Documentation inherited.
|
// Documentation inherited.
|
||||||
public void paint (Graphics2D gfx)
|
public void paint (Graphics2D gfx)
|
||||||
{
|
{
|
||||||
|
if (_scaleFactor <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// If we are flipping the card, scale it horizontally.
|
// If we are flipping the card, scale it horizontally.
|
||||||
AffineTransform otrans = gfx.getTransform();
|
AffineTransform otrans = gfx.getTransform();
|
||||||
if (_scaleFactor < 1.0) {
|
if (_scaleFactor < 1.0) {
|
||||||
gfx.translate(getX() + getWidth()/2, 0);
|
int xtrans = getX() + getWidth()/2;
|
||||||
|
gfx.translate(xtrans, 0);
|
||||||
gfx.scale(_scaleFactor, 1.0);
|
gfx.scale(_scaleFactor, 1.0);
|
||||||
gfx.translate(-getX() - getWidth()/2, 0);
|
gfx.translate(-xtrans, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_alphaComposite.getAlpha() < 1.0f) {
|
if (_alphaComposite.getAlpha() < 1.0f) {
|
||||||
|
|||||||
Reference in New Issue
Block a user