Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How does Zoom() work? [PARTIALLY SOLVED]  (Read 1911 times)

0 Members and 1 Guest are viewing this topic.

HannesP

  • Newbie
  • *
  • Posts: 6
    • View Profile
How does Zoom() work? [PARTIALLY SOLVED]
« on: January 08, 2009, 01:57:53 am »
I want my entire game to be displayed with a 2x magnification, so I created a view with measures 0.5 times those of the window, and called Zoom(2) on it.

Without the zoom, (0,0) was located in the top left corner, which made sense to me. With the zoom however, the in-window position of (0,0) was changed to a seemingly random one (though same every time, of course), while I expected it to remain in the top left corner.

How is (0,0) calculated, after a zooming has been performed? I'd like it to stay in the top left corner, but in order to do any calculations for moving it I have to understand how the current system works.

Also, is there any way to make the images remain sharp, instead of being blurred, after the zoom?

EDIT: main question solved. The problem was that I both set the scale factor to 2 and used a view with a quarter as big as the RenderWindow.

My second question (blurred images) remains though.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
How does Zoom() work? [PARTIALLY SOLVED]
« Reply #1 on: January 08, 2009, 07:50:01 am »
Second question : use image.SetSmooth(false).
Laurent Gomila - SFML developer

 

anything