【发布时间】:2012-10-26 01:05:41
【问题描述】:
我想知道如何在 SFML 中获得文本的尺寸?
我试着这样做:
sf::Text text("Hello SFML", font, 50);
// using text.getRect()
// i also tried getScale() & getSize()
// neither are correct
text.setPosition( window.getSize().y/2 - text.getRect().y,50 );
有人知道吗?
谢谢:)
【问题讨论】: