World: r3wp
[!REBOL3 GUI]
older newer | first last |
Maxim 12-Aug-2010 [2587] | but that depends on the specifics of the engine. afaik, AGG, in the way it is being used by view renders each element on the canvas, one by one. |
BrianH 12-Aug-2010 [2588] | The coordinate system used for most OSes screen coordinates is top down. |
Maxim 12-Aug-2010 [2589] | brian. it is inconsequential... its numbers . rendering things starting from the bottom won't change the coordinates. it will simply invert them without requiring you to adapt any number. |
Graham 12-Aug-2010 [2590] | Max .. suggest it to Carl |
BrianH 12-Aug-2010 [2591] | Maxim, do you not get that I am agreeing with you? I am just disagreeing that it should be bottom-up all the time :) |
Maxim 12-Aug-2010 [2592] | I never said it should be all the time... it can easily be a switch on each gob. |
BrianH 12-Aug-2010 [2593] | Some gob types (only Draw, maybe images, afaict) would benefit from bottom up. |
Maxim 12-Aug-2010 [2594] | as long as the gob knows its size it knows how to move its origin wrt its parent gob and render upside down. |
BrianH 12-Aug-2010 [2595] | Having a switch on new gobs will add to complexity. Having it fixed per gob type lowers complexity (outside of docs and tutorials). |
Maxim 12-Aug-2010 [2596] | it should be a switch, since you want your coordinates to align. if you have to add graphics to text, for example, they should use the same coordinate system. |
BrianH 12-Aug-2010 [2597x2] | Complexity is the enemy for the R3 GUI. |
If you have to add graphics to text, you are using Draw. | |
Maxim 12-Aug-2010 [2599x2] | it won't add to the complexity. that's the point of it being a switch. |
if you are building your own draw gobs, you have an 'option' for it to render upside down. that's it. | |
BrianH 12-Aug-2010 [2601] | You can't add graphics to a text gob. Or any of the other specialized gobs, just to the draw gob. |
Maxim 12-Aug-2010 [2602x2] | yes I know, I am speaking high-level here, sorry. if you have to match values of different gob types which render in different directions, it will be mayhem. |
which is why it must be a switch. within everything using the same direction by default. | |
BrianH 12-Aug-2010 [2604x2] | They don't render in different directions. All of them render from the top down. What you are talking about is internal coordinates. How the gob is located externally has nothing to do with how it is coordinated internally. |
Gobs can contain other gobs. | |
Maxim 12-Aug-2010 [2606x3] | yes I know all of this. i am trying to add functionality to the rendering engine... its totally invisible to actual gob high-level constructs. |
and allowing a switch to the gob, so it can tell *only* the rasterizing engine to render bottom up, using all of the internal coordinate values AS-IS. | |
this effectively adds very little overhead, and solves the issue for all cases. | |
BrianH 12-Aug-2010 [2609] | So all you are talking about is Draw. It wouldn't have anything to do with switches to a gob, since it would be fully contained within one gob. |
Maxim 12-Aug-2010 [2610] | no, I want all gob children to obey the direction. |
BrianH 12-Aug-2010 [2611] | Except for gob children that aren't Draw gobs. |
Maxim 12-Aug-2010 [2612x3] | why prevent them from accessing the feature? if the rasterizer can work on either directions, I think all gobs should have the capability to control this. they would simply inherit the "current" direction or not based on type, but they should be allowed to render upside too, if specifically required. |
you are assuming view is used to draw GUIs, but its used for other things too. | |
R3 GUI would be top-down by default for everything. | |
BrianH 12-Aug-2010 [2615x2] | There is no problem with the external coordinate system that placed a gob being completely different from its internal coordinate system. It just adds complexity. But having the coordinate system be inherited adds so much more complexity (modal behavior) that it is a bad idea. It is better to have each gob have a predictable coordinate system, not a different one based on its container. |
I am having trouble explaining this to you without pictures. | |
Maxim 12-Aug-2010 [2617] | it depends on gob type. font should not inherit by default, draw should. but I might want to render text upside to create a reflection, without incurring the hit of applying a transform to the coordinates... |
BrianH 12-Aug-2010 [2618] | All such things should be done with draw gobs. |
Maxim 12-Aug-2010 [2619] | but I also might draw to render top-down. |
BrianH 12-Aug-2010 [2620] | Complexity is the enemy here. We don't want to add too many options, because processing them has overhead in mental, development time and runtime. Pick a coordinate system. |
Maxim 12-Aug-2010 [2621x3] | direction would be a tri-state 'up 'down none. none means inherit. all gob types would have their defaults set to one of the three states. |
the fact that its implemented as above, means its consistent and simple. | |
if each type does something different then everything becomes complex, except for one if condition in the run-time. | |
BrianH 12-Aug-2010 [2624] | Sorry, you lost me at "inherit". I'll have to let Cyphre chime in from this point. |
Maxim 12-Aug-2010 [2625] | again, I'd have to look at the AGG rasterizing pipeline to see how it functions, but the only procedural overhead is in how it inherits its origin at each gob. it might even be impossible from the get-go, based on how the actual rasterization is performed. in Flash this would be impossible. but IIRC past discussions with Cyphre, we use a different rasterizing process, which would allow the whole idea. |
BrianH 12-Aug-2010 [2626] | You keep looking at procedural overhead and ignoring conceptual and declarative overhead. Keep those in mind, please. |
Maxim 12-Aug-2010 [2627x2] | no I am not. the implementation example allows a 100% invisible to current use, without any in-REBOL code added. applying it is a simple assignment of a value to a (new) gob! property. |
conceptually is solves a problem in just about GUI engines out there. and its dead simple to use and understand. | |
BrianH 12-Aug-2010 [2629] | And with that added option, how simple is it to check the gobs to make sure the option isn't specified? Multiply that answer by the number of times that check would need to be added to code. That is why you lost me at "inherit". But if you can convince Carl and Cyphre, go for it. |
Maxim 12-Aug-2010 [2630] | the way I see it the direction would be managed at the same place and time any origin check is performed. |
BrianH 12-Aug-2010 [2631] | at the same place and time any origin check is performed - That is the added complexity, the origin checks. |
Maxim 12-Aug-2010 [2632] | yep. |
BrianH 12-Aug-2010 [2633] | And how often would user code written in REBOL need to add origin checks? Style writers? |
Maxim 12-Aug-2010 [2634x3] | for GUIs, actually never. unless they are building a funky style which manages this property specifically. |
if you decide to reverse rendering direction, manually, its your decision. you children should render upside down. | |
that is what you asking view to do. | |
older newer | first last |