You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current painter is useful to track the cursor position, but it could be augmented to support clipping, and it could be augmented to solve the problem with ScrollView, to allow arbitrary controls to be embedded into a ScrollView and behave the same way a control works inside a UIScrollView - that is, they do not know that they are being scrolled.
I have a patch that passes a "painter' argument to every redraw function, and in ScrollView, a new ContentView that can pass a Painter that has been altered to deal with a content offset (drawing before this point does nothing).
For this to work though, it is not enough for the top-level control to take a modifier painter, but Painter objects need to be created with a parent link, so rather than just calling Painter (from: view), it would need to use Painter (from: view, on: currentPainter).
That is one option.
Another option would be to make the Painter method allocate a buffer for the bounds, and upon completion of the rendering, it would copy the data to the right location. This has the advantage that we could properly clip everything.
Still thinking about this.
This patch contains the wiring up of Painter, but does not do the double buffering described here:
The current painter is useful to track the cursor position, but it could be augmented to support clipping, and it could be augmented to solve the problem with ScrollView, to allow arbitrary controls to be embedded into a ScrollView and behave the same way a control works inside a UIScrollView - that is, they do not know that they are being scrolled.
I have a patch that passes a "painter' argument to every redraw function, and in ScrollView, a new ContentView that can pass a Painter that has been altered to deal with a content offset (drawing before this point does nothing).
For this to work though, it is not enough for the top-level control to take a modifier painter, but Painter objects need to be created with a parent link, so rather than just calling
Painter (from: view)
, it would need to usePainter (from: view, on: currentPainter)
.That is one option.
Another option would be to make the Painter method allocate a buffer for the bounds, and upon completion of the rendering, it would copy the data to the right location. This has the advantage that we could properly clip everything.
Still thinking about this.
This patch contains the wiring up of Painter, but does not do the double buffering described here:
https://gist.github.com/migueldeicaza/954c2c64be08d8bb7849f2374759e25c
That would also make it uglier to debug with
sync
The text was updated successfully, but these errors were encountered: