在PlayN1.3.
TextFormat textFormat = new TextFormat(myFont, textWidth, Alignment.LEFT, colorCode, Effect.shadow(-16777216, shadowX, shadowY));
所以我把它改成这个:
TextFormat textFormat = new TextFormat();
textFormat.withFont(myFont);
textFormat.withWrapping(textWidth, Alignment.LEFT);
我现在不想有影子, 但我没有像结果一样得到前身。 等待, 不要现在思考。 然后我把这个代码改成了这个:
TextFormat textFormat = new TextFormat().withFont(myFont).withWrapping(textWidth, Alignment.LEFT);
It gives me result as previous except shadow which i dont care now.If i am not wrong this is one line representation of above code.Is not it? So why it worked and above code did not.Any conceptual difference is there? Anyone can explain please!
/注:不要担心变量(文字Width、MyFont),这些变量与这些变量无关。