gCard.setHeight(0);
gCard.setWidth(0);
}
if (gCList.size() > 0 && gCList.get(gCList.size() - 1) != null){
GraphicsCard shownCard = gCList.get(gCList.size() - 1);
if (gZ.getWidth() >= gZ.getHeight()) {
shownCard.setX((int) (gZ.getWidth()/2 -
((1/gCList.get(0).getScale())*(gZ.getHeight()*(1 - 2*border)))/2 + gZ.getX()) );
shownCard.setY((int) (gZ.getHeight()*border + gZ.getY()) );
shownCard.setHeight((int) (gZ.getHeight()*(1 - 2*border)) );
shownCard.setWidth((int) ((1/shownCard.getScale())*(gZ.getHeight()*(1 - 2*border))) );
}
else {
shownCard.setY((int) (gZ.getHeight()/2 -
(shownCard.getScale()*(gZ.getWidth()*(1 - 2*border)))/2 + gZ.getY()) );
shownCard.setX((int) (gZ.getWidth()*border + gZ.getX()) );
shownCard.setHeight((int) (shownCard.getScale()*(gZ.getWidth()*(1 - 2*border))) );
shownCard.setWidth((int) (gZ.getWidth()*(1 - 2*border)) );
}
}
}