Why am I writing a THIRD text component class?!?
Hipreme
msnmancini at hotmail.com
Wed Dec 21 13:28:26 UTC 2022
On Tuesday, 20 December 2022 at 03:05:05 UTC, Adam D Ruppe wrote:
> Take the bait. Click the link. The answer may surprise you.
>
> (ok let's be real, it probably won't surprise you, but you
> might enjoy the read anyway. then tell me if you guessed the
> reason correctly or not!!)
>
> http://dpldocs.info/this-week-in-d/Blog.Posted_2022_12_19.html
I find funny in how my current solution for viewport styles (such
as Stretch or Fit) seems like your 3rd attempt. Some times
letting the definition outside your thing is the best to do. This
was a real lesson I got from when I started doing my API
interface for my engine.
My text class is a little similar in that it does not draw
itself, it is just an object to be drawn from the text renderer.
So, it holds the string to draw and its vertices information, but
the reason was only for not tying it to the renderer itself, so I
could increase compilation speed. I find it amazing into how we
code our solutions to problems based on which aspect of the
problem we wish to tackle it more.
More information about the Digitalmars-d-announce
mailing list