The view has two parameters: what it sees, and where it displays it. What you're playing with is what the view sees, so no matter what you do it is still displayed in the whole window.
What you need to change is the Viewport attribute of the view.
Thanks for the clarification. So I should put (0,0,1024,768) as the View's first parameter?
I'm also confused about the Viewport: since its values are relative to the window, how can I easily adjust it to be in the (295,40,704,704) area?
---
Using maths I got this:
View.Viewport = new FloatRect(0.288f,
0.052f,
0.688f,
0.917f);
There has to be a more elegant solution, right?
Anyway, it now displays in the "rectangle" as intended, but only when:
View = new View(new FloatRect(0, 0, 1024, 1024));
Instead, when I had:
View = new View(new FloatRect(0, 0, 1024, 768));
changing the View.Viewport gave me a distorted image.
I'm even more confused now ---
1) How can I set the Viewport without having to do all the divisions to get values such as (0.917f) and so on?
2) When I create a new View, what should the FloatRect sizes be? Should they be the same as the "camera area"? Or the same as the RenderWindow?
3) Why does changing the Viewport stretches the result? Shouldn't the Viewport only tell the View where the "camera area" is?