Page 1 of 1

Point list to renderer class

Posted: Thu May 13, 2004 09:06
by alipolatolu
Hi,

I have a suggestion. You know that i need to develop shapes different from quad. This feature must be in renderer class.

I think you can add a function to the renderer class that we can give point arrays :) When we called this function, and give a point list, It can generate the shape of this points and adds this shape to queue :)

Am I right? By this function, I (and every user of this system) can make customized shapes easily by making my own functions. For example, if I want a rounded Rectangle, I can create a RoundRect function that returns pointlist.

What do you think about this?

Thanks,

Polat

Point list to renderer class

Posted: Thu May 13, 2004 12:21
by CrazyEddie
What you suggest is obviously theoretically possible, though the points would need to be properly validated and split into some supported geometry type (triangle strip, or whatever).

Another thing is how the resulting geometry would be textured. Since (at the window rendering level of abstraction) the system has no notion of a texture as such, but rather a collection of separate sprites or images. So you would need to expose the underlying texture. At this point you are dealing with raw geometry and textures - so you may as well do this directly and talk to the underlying API or engine.

In addition to the above, there would also be issues related to (but probably not limited to) hit-detection and clipping. If all images and controls are no longer quads, then you have to modify the system to be able to work with arbitrary geometry - which while not impossible, would most likely involve re-working large chunks of the system (for clipping you could no longer simply grab a Rect for the window, you'd have to ask for "the clipper" which would potentially be much more complicated, and to perform the actual clipping, what is currently a simple two-rect intersection calculation becomes a potentially complex masking operation).

I do not discount the possibility that such things will be added to the system, but I will say that if I, personally, undertook such a task it, would be way off in the distant future ;) However, if you or somebody else were to create such a modification - feel free to submit a patch as I'm always more than willing to look at contributed modifications to the system :D

Point list to renderer class

Posted: Thu May 13, 2004 13:21
by alipolatolu
Yep, don't worry about this ;) I will share things that I added to this system. I will develop some new Widgets (like toolbar, menu, status bar, etc.). and I will also post them to you. In my plans there is a DXSound App to add this system for playing music.

I'm developing a Smart Home (Intelligent Homes) system, and this GUI is a part of this system :D We are developing radio controlled home devices.

Thank you for answer, I think i will continue in the same way :roll:

Polat

Point list to renderer class

Posted: Thu May 13, 2004 17:18
by CrazyEddie
I will develop some new Widgets (like toolbar, menu, status bar, etc.). and I will also post them to you.

Cool :D

I'm developing a Smart Home (Intelligent Homes) system, and this GUI is a part of this system :D We are developing radio controlled home devices.

Sounds interesting. Amazing the number of uses for the GUI system which I never considered. :)

Point list to renderer class

Posted: Thu Jun 03, 2004 17:27
by CrazyEddie
Using a whole image for a Gui component is pretty simple. It's really a case of (almost) anything goes.

The hit detection function is a virtual member which allows any Gui element to use any means of hit-detection it likes. All of the base stuff that's been written so far uses the simplest method of testing a given point is within a Rect. Using bitmapped masks and what have you is certainly a possibility for complex shapes, though the system has no built-in support for this (at the moment anyway), so the widget designer would have to watch to see what scaling to apply before doing the test.