Hehe, very true. Havn't really started on thoose functions soOriginally Posted by cairnswm
Haha, hopefully you understand how to use it atleast, I will write a small demo showing off how to write a custom texture loader when I got the time, could be used for loading fractals for example.Originally Posted by cairnswm
Hehe, stealing is goodOriginally Posted by cairnswm
Well, the next project, after the imageList class with all the simple Draw functions in place (Draw, StrechDraw, TileDraw, DrawRotate, DrawAlpha etc) is done is the font renderer.
What i have in mind is creating an abstractation between a font and a text renderer, ie the THPXFont class only contains the bitmap texture as well as glyph information (width, heigt, offset etc) and the loading functions and display lists.
Then the text renderer(s ?) handles all the rendering routines, could be TPHXTextRendererPlain, TPGXTextRendererHtml and whatever you want. Ie something like this:
Font = FontList.LoadFont('Arial.png');
TextRenderer = TPHXTextRendererPlain.Create();
TextRenderer.TextOut(Font, 10, 10, 'My little text');
TextRenderer.WrapText(Font, 10, 10, 200, 200, 'My very very very long text, it will not fit in one row ';
TextRenderer2 := TPHXTextRendererHtml.Create();
TextRenderer2.TextOut(Font, 10, 10, 'SomeHtml text<br>with <p>Styles</p>)';
Something like that, ofc it wont be a full html renderer, but could still be usefull
Or rather the creation of a font renderer would be more like this:
Renderer := TPHXTextRenderer.getRenderer("html");
This way you could register your own renderers quite easy:
Any ideas or suggestions ?