turbobadger icon indicating copy to clipboard operation
turbobadger copied to clipboard

rotate support

Open ejkoy opened this issue 10 years ago • 1 comments

how to add rotate support on turbobadger?

ejkoy avatar Jul 01 '15 16:07 ejkoy

It would be a bit time consuming to implement, at least if it should be full blown support:

  • Transform in TBWidget holding the rotation(/matrix). I have a branch that allocates an "TBWidgetTransform" for TBWidgets that needs it, but it does only do layout scale now (for some animation improvements), but it's the ideal place for rotation too. I haven't had time to finish this branch unfortunately but this is the simple part anyway.
  • Using transform on pointer input coordinates.
  • Using transform on rendering. This would be easy except for clipping which would either require use of stencil buffer or layered rendering support (which would be awesome). This would of course require additional render APIs that require backend implementation.
  • There might be edge artifacts with some skin parts with the default skin. I think i saw this on something the last time i tried (just used glRotate before rendering, so i did not have built in rotation support in TB).

If some limitations are acceptable (no rotated clipping support), it would be much easier. I'd vote for this option since it would keep it simple and renderer backends super simple. Rotating complex UI (scrollable lists/windows etc) is bad UI anyway. For simple widgets, such as TBButton, no clipping is currently used.

fruxo avatar Jul 01 '15 20:07 fruxo