Page 1 of 1

How to draw line and box?

Posted: Tue Aug 01, 2006 10:45
by PeakGao
Hi,
I trying to write a simple HTML control, i need to draw table lines, CEGUI's Renderer can draw lines, but depend to texture. if don't depend to texture, how to solve?

Re: How to draw line and box?

Posted: Tue Aug 01, 2006 16:06
by Van
PeakGao wrote:Hi,
I trying to write a simple HTML control, i need to draw table lines, CEGUI's Renderer can draw lines, but depend to texture. if don't depend to texture, how to solve?


Perhaps it may be better to create a special looknfeel/imageset for your "HTML" widget sets?

Posted: Tue Aug 01, 2006 16:15
by Rackle
I've been thinking about such a widget. My initial thinking would be to use ScrollablePane and add various StaticText, StaticImage, and MulticolumnList children. In your case the MulticolumnList would draw its own lines. Hope that gives you some ideas.

Posted: Wed Aug 02, 2006 02:54
by PeakGao
Rackle wrote:I've been thinking about such a widget. My initial thinking would be to use ScrollablePane and add various StaticText, StaticImage, and MulticolumnList children. In your case the MulticolumnList would draw its own lines. Hope that gives you some ideas.


hehe.., I think that the idea is too simple and the MulticolumnList can not use instead of the HTML table. the HTML table is very flexible, but the MulticolumnList is not.

ps: In games, the simple HTML window is very useful. the more windows can be designed by the simple HTML window.

Posted: Wed Aug 02, 2006 10:01
by Turtle
Hi PeakGao,

You could always "render" your entire HTML to your own texture and then pass this over to CEGUI to display. Not sure if this is a good idea or not mind you ;) Hmm.. you might even be able to use a library such as antigrain (http://www.antigrain.com/) to do the rendering to a block of memory, but it could be a lot of work (?).

Cheers.

Posted: Fri Aug 04, 2006 08:16
by Turtle
Actually, that would most likely be slower...