Firstly, it is redundant, because I know there is a view in the canvas.
Secondly as I already remarked, if I was drawing something on a sf::RenderWindow/sf::RenderTexture and now wish to draw it on a sfg::Canvas, this requires extra work (given that I use the interface of sf::RenderTarget).
Is that all that is missing? I need an exhaustive shopping list before I consider this feature for addition.
- getDefaultView() and getViewport()
- 4 map* functions
- push/pop/reset GL states
These are the differences between sf::RenderTarget and sfg::Canvas at the moment.
sf::RenderTarget::getSize() seems covered by
sfg::Widget::GetAllocation().
Not sure about GL states, haven't tried mixing SFML and GL drawing on a canvas.
It will be great if sfg::Canvas was indistinguishable from sf::RenderTarget. This may be quite simple now, I don't know. (I had tried this in the past and ran away scared from the internals of the Canvas).