(Graphics g, float x, float y, float w, float h)
| 33 | } |
| 34 | |
| 35 | @Override |
| 36 | public void draw(Graphics g, float x, float y, float w, float h) { |
| 37 | CardView cv = CardView.getCardForUi(card); |
| 38 | if (image == null) { //attempt to retrieve card image if needed |
| 39 | image = ImageCache.getInstance().getImage(card); |
| 40 | if (image == null) { |
| 41 | if (!Forge.enableUIMask.equals("Off")) //render this if mask is still loading |
| 42 | CardImageRenderer.drawCardImage(g, cv, false, x, y, w, h, CardStackPosition.Top, Forge.enableUIMask.equals("Art"), true); |
| 43 | |
| 44 | return; //can't draw anything if can't be loaded yet |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | if (image == ImageCache.getInstance().getDefaultImage() || Forge.enableUIMask.equals("Art")) { |
| 49 | CardImageRenderer.drawCardImage(g, cv, false, x, y, w, h, CardStackPosition.Top, true, true); |
| 50 | } else { |
| 51 | if (Forge.enableUIMask.equals("Full")) { |
| 52 | if (ImageCache.getInstance().isFullBorder(image)) |
| 53 | g.drawCardRoundRect(image, null, x, y, w, h, false, false, false); |
| 54 | else { |
| 55 | float radius = (h - w) / 8; |
| 56 | g.drawborderImage(ImageCache.getInstance().borderColor(image), x, y, w, h); |
| 57 | g.drawImage(ImageCache.getInstance().croppedBorderImage(image), x + radius / 2.2f, y + radius / 2, w * 0.96f, h * 0.96f); |
| 58 | } |
| 59 | } else if (Forge.enableUIMask.equals("Crop")) { |
| 60 | g.drawImage(ImageCache.getInstance().croppedBorderImage(image), x, y, w, h); |
| 61 | } else |
| 62 | g.drawImage(image, x, y, w, h); |
| 63 | } |
| 64 | } |
| 65 | } |
nothing calls this directly
no test coverage detected