Revision ff60e713
Added by Leszek Koltunski over 3 years ago
| src/main/java/org/distorted/objectlib/main/TwistyObject.java | ||
|---|---|---|
| 1723 | 1723 |
paint.setAntiAlias(true); |
| 1724 | 1724 |
paint.setTextAlign(Paint.Align.CENTER); |
| 1725 | 1725 |
paint.setStyle(Paint.Style.FILL); |
| 1726 |
|
|
| 1727 | 1726 |
paint.setColor(getInternalColor()); |
| 1728 | 1727 |
canvas.drawRect(0, 0, mNumTexCols*TEXTURE_HEIGHT, mNumTexRows*TEXTURE_HEIGHT, paint); |
| 1729 | 1728 |
|
| ... | ... | |
| 1736 | 1735 |
if( texture<mNumTextures-mNumOverrides ) |
| 1737 | 1736 |
{
|
| 1738 | 1737 |
ObjectSticker sticker = retSticker(texture/mNumFaceColors); |
| 1739 |
int color = getColor(texture% mNumFaceColors);
|
|
| 1738 |
int color = getColor(texture%mNumFaceColors); |
|
| 1740 | 1739 |
factory.drawRoundedPolygon(canvas, paint, col*TEXTURE_HEIGHT, (mNumTexRows-row)*TEXTURE_HEIGHT, color, sticker); |
| 1741 |
texture++; |
|
| 1742 | 1740 |
} |
| 1743 |
else if( texture<mNumTextures )
|
|
| 1741 |
else if( texture>mNumTextures-mNumOverrides && texture<=mNumTextures )
|
|
| 1744 | 1742 |
{
|
| 1745 |
int color = mStickerOverrides[mNumTextures-texture-1].getColor(); |
|
| 1746 |
int left = col*TEXTURE_HEIGHT; |
|
| 1747 |
int bottom = (mNumTexRows-row)*TEXTURE_HEIGHT; |
|
| 1748 |
paint.setColor(color); |
|
| 1749 |
canvas.drawRect(left,bottom-TEXTURE_HEIGHT,left+TEXTURE_HEIGHT,bottom,paint); |
|
| 1743 |
int color = mStickerOverrides[mNumTextures-texture].getColor(); |
|
| 1744 |
factory.drawSolidColor(canvas, paint, col*TEXTURE_HEIGHT, (mNumTexRows-row)*TEXTURE_HEIGHT, color); |
|
| 1750 | 1745 |
} |
| 1746 |
|
|
| 1747 |
texture++; |
|
| 1751 | 1748 |
} |
| 1752 | 1749 |
} |
| 1753 | 1750 |
|
Also available in: Unified diff
Progress with sticker overrides.