Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FontManager extended #47

Closed
ariogato opened this issue Oct 17, 2017 · 0 comments
Closed

FontManager extended #47

ariogato opened this issue Oct 17, 2017 · 0 comments

Comments

@ariogato
Copy link
Owner

Wir haben nun einen wunderbaren FontManager (Ticket #38), der uns einwandfrei einen Text auf den Bildschirm zeichnen kann.

Zwei Kleinigkeiten könnten an ihm jedoch noch verbessert werden:

  1. Was passiert wenn drawCharacter(char character, ...) mit einem character aufgerufen wird, der sich nicht im Alphabet befindet?
  2. Der zweite Aspekt ist zwar durchaus keine Kleinigkeit, aber trotzdem machbar (mit ein Bisschen Arbeit selbstverständlich ;-) )

    Wir wollen eine Funktion im Fontmanager, die ein ObjectRectangle (oder SDL_Rect je nachdem was der Geschmack des Entwicklers ist) entgegennimmt und den text innerhalb der Grenzen dieses Rechtecks rendert.

    Die aktuelle Form der drawText() Funktion rendert den Text zwar, aber würde - falls der Text ein wenig mehr Zeichen enthält - über den Rand des Rechtecks hinausrendern. Das heißt es bedarf eines Algorithmus, der erkennt, wenn ein Wort nicht mehr in die Zeile passt und es folglich in die nächste rendert.
@ariogato ariogato added this to the Feinheiten milestone Oct 17, 2017
@ariogato ariogato added this to TODO in Koramu Oct 17, 2017
@ariogato ariogato moved this from TODO to In progress in Koramu Oct 20, 2017
@LemmingFaunTM LemmingFaunTM moved this from In progress to Review in Koramu Oct 23, 2017
@ariogato ariogato moved this from Review to Done in Koramu Oct 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants