mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 15:51:04 +08:00
Added documentation note on coordinates and undistorted rendering
This commit is contained in:
parent
4a300547f3
commit
e074b6775e
@ -255,6 +255,8 @@ private :
|
||||
/// used by a sf::Sprite (i.e. never write a function that
|
||||
/// uses a local sf::Texture instance for creating a sprite).
|
||||
///
|
||||
/// See also the note on coordinates and undistorted rendering in sf::Transformable.
|
||||
///
|
||||
/// Usage example:
|
||||
/// \code
|
||||
/// // Declare and load a texture
|
||||
|
@ -330,6 +330,8 @@ private :
|
||||
/// used by a sf::Text (i.e. never write a function that
|
||||
/// uses a local sf::Font instance for creating a text).
|
||||
///
|
||||
/// See also the note on coordinates and undistorted rendering in sf::Transformable.
|
||||
///
|
||||
/// Usage example:
|
||||
/// \code
|
||||
/// // Declare and load a font
|
||||
|
@ -412,6 +412,18 @@ private :
|
||||
/// };
|
||||
/// \endcode
|
||||
///
|
||||
/// A note on coordinates and undistorted rendering: \n
|
||||
/// By default, SFML (or more exactly, OpenGL) may interpolate drawable objects
|
||||
/// such as sprites or texts when rendering. While this allows transitions
|
||||
/// like slow movements or rotations to appear smoothly, it can lead to
|
||||
/// unwanted results in some cases, for example blurred or distorted objects.
|
||||
/// In order to render a sf::Drawable object pixel-perfectly, make sure
|
||||
/// the involved coordinates allow a 1:1 mapping of pixels in the window
|
||||
/// to texels (pixels in the texture). More specifically, this means:
|
||||
/// * The object's position, origin and scale have no fractional part
|
||||
/// * The object's and the view's rotation are a multiple of 90 degrees
|
||||
/// * The view's center and size have no fractional part
|
||||
///
|
||||
/// \see sf::Transform
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -336,6 +336,8 @@ private :
|
||||
/// window.draw(someText);
|
||||
/// \endcode
|
||||
///
|
||||
/// See also the note on coordinates and undistorted rendering in sf::Transformable.
|
||||
///
|
||||
/// \see sf::RenderWindow, sf::RenderTexture
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user