710 lines
43 KiB
HTML
710 lines
43 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>SFML - Simple and Fast Multimedia Library</title>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
|
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<script type="text/javascript" src="clipboard.js"></script>
|
|
<script type="text/javascript" src="cookie.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="search/search.css" />
|
|
<link rel="stylesheet" type="text/css" href="searchOverrides.css" />
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(document).ready(function() { init_search(); });
|
|
/* @license-end */
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="banner-container">
|
|
<div id="banner">
|
|
<span id="sfml">SFML 3.0.0</span>
|
|
</div>
|
|
</div>
|
|
<div id="content">
|
|
<div>
|
|
<!-- Generated by Doxygen 1.12.0 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() { codefold.init(0); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="topics.html"><span>Topics</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"> </span>
|
|
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function(){ initResizable(false); });
|
|
/* @license-end */
|
|
</script>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="namespacesf.html">sf</a></li><li class="navelem"><a class="el" href="classsf_1_1View.html">View</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div id="doc-content">
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="classsf_1_1View-members.html">List of all members</a> </div>
|
|
<div class="headertitle"><div class="title">sf::View Class Reference<div class="ingroups"><a class="el" href="group__graphics.html">Graphics module</a></div></div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>2D camera that defines what region is shown on screen
|
|
<a href="#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="View_8hpp_source.html">SFML/Graphics/View.hpp</a>></code></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a7405abaa98a7772b4ad7490d213c8941" id="r_a7405abaa98a7772b4ad7490d213c8941"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a7405abaa98a7772b4ad7490d213c8941">View</a> ()=default</td></tr>
|
|
<tr class="memdesc:a7405abaa98a7772b4ad7490d213c8941"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br /></td></tr>
|
|
<tr class="separator:a7405abaa98a7772b4ad7490d213c8941"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1d63bc49e041b3b1ff992bb6430e1326" id="r_a1d63bc49e041b3b1ff992bb6430e1326"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a1d63bc49e041b3b1ff992bb6430e1326">View</a> (const <a class="el" href="namespacesf.html#a701020eb396e62ba560619e68c689a38">FloatRect</a> &rectangle)</td></tr>
|
|
<tr class="memdesc:a1d63bc49e041b3b1ff992bb6430e1326"><td class="mdescLeft"> </td><td class="mdescRight">Construct the view from a rectangle. <br /></td></tr>
|
|
<tr class="separator:a1d63bc49e041b3b1ff992bb6430e1326"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a01eb9b64eb8944ea012936f56268ce18" id="r_a01eb9b64eb8944ea012936f56268ce18"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a01eb9b64eb8944ea012936f56268ce18">View</a> (<a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a> center, <a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a> size)</td></tr>
|
|
<tr class="memdesc:a01eb9b64eb8944ea012936f56268ce18"><td class="mdescLeft"> </td><td class="mdescRight">Construct the view from its center and size. <br /></td></tr>
|
|
<tr class="separator:a01eb9b64eb8944ea012936f56268ce18"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a27c800522c013ccbd4ac2b6f321b4376" id="r_a27c800522c013ccbd4ac2b6f321b4376"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a27c800522c013ccbd4ac2b6f321b4376">setCenter</a> (<a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a> center)</td></tr>
|
|
<tr class="memdesc:a27c800522c013ccbd4ac2b6f321b4376"><td class="mdescLeft"> </td><td class="mdescRight">Set the center of the view. <br /></td></tr>
|
|
<tr class="separator:a27c800522c013ccbd4ac2b6f321b4376"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a49ad66679cd7a461917eaee587020354" id="r_a49ad66679cd7a461917eaee587020354"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a49ad66679cd7a461917eaee587020354">setSize</a> (<a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a> size)</td></tr>
|
|
<tr class="memdesc:a49ad66679cd7a461917eaee587020354"><td class="mdescLeft"> </td><td class="mdescRight">Set the size of the view. <br /></td></tr>
|
|
<tr class="separator:a49ad66679cd7a461917eaee587020354"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a73a27e9e90f4f00e0783fa2e771dfa98" id="r_a73a27e9e90f4f00e0783fa2e771dfa98"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a73a27e9e90f4f00e0783fa2e771dfa98">setRotation</a> (<a class="el" href="classsf_1_1Angle.html">Angle</a> angle)</td></tr>
|
|
<tr class="memdesc:a73a27e9e90f4f00e0783fa2e771dfa98"><td class="mdescLeft"> </td><td class="mdescRight">Set the orientation of the view. <br /></td></tr>
|
|
<tr class="separator:a73a27e9e90f4f00e0783fa2e771dfa98"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8eaec46b7d332fe834f016d0187d4b4a" id="r_a8eaec46b7d332fe834f016d0187d4b4a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a8eaec46b7d332fe834f016d0187d4b4a">setViewport</a> (const <a class="el" href="namespacesf.html#a701020eb396e62ba560619e68c689a38">FloatRect</a> &viewport)</td></tr>
|
|
<tr class="memdesc:a8eaec46b7d332fe834f016d0187d4b4a"><td class="mdescLeft"> </td><td class="mdescRight">Set the target viewport. <br /></td></tr>
|
|
<tr class="separator:a8eaec46b7d332fe834f016d0187d4b4a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a51029b20359f9889f4e0ad8c8254abc9" id="r_a51029b20359f9889f4e0ad8c8254abc9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a51029b20359f9889f4e0ad8c8254abc9">setScissor</a> (const <a class="el" href="namespacesf.html#a701020eb396e62ba560619e68c689a38">FloatRect</a> &scissor)</td></tr>
|
|
<tr class="memdesc:a51029b20359f9889f4e0ad8c8254abc9"><td class="mdescLeft"> </td><td class="mdescRight">Set the target scissor rectangle. <br /></td></tr>
|
|
<tr class="separator:a51029b20359f9889f4e0ad8c8254abc9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aadd146fcb51b838c935bdc487f171247" id="r_aadd146fcb51b838c935bdc487f171247"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#aadd146fcb51b838c935bdc487f171247">getCenter</a> () const</td></tr>
|
|
<tr class="memdesc:aadd146fcb51b838c935bdc487f171247"><td class="mdescLeft"> </td><td class="mdescRight">Get the center of the view. <br /></td></tr>
|
|
<tr class="separator:aadd146fcb51b838c935bdc487f171247"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4e5953e811413746fce3e134bd778416" id="r_a4e5953e811413746fce3e134bd778416"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a4e5953e811413746fce3e134bd778416">getSize</a> () const</td></tr>
|
|
<tr class="memdesc:a4e5953e811413746fce3e134bd778416"><td class="mdescLeft"> </td><td class="mdescRight">Get the size of the view. <br /></td></tr>
|
|
<tr class="separator:a4e5953e811413746fce3e134bd778416"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5b61f4e9d09024cbf9a5b2cdc314e693" id="r_a5b61f4e9d09024cbf9a5b2cdc314e693"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Angle.html">Angle</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a5b61f4e9d09024cbf9a5b2cdc314e693">getRotation</a> () const</td></tr>
|
|
<tr class="memdesc:a5b61f4e9d09024cbf9a5b2cdc314e693"><td class="mdescLeft"> </td><td class="mdescRight">Get the current orientation of the view. <br /></td></tr>
|
|
<tr class="separator:a5b61f4e9d09024cbf9a5b2cdc314e693"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa2006fa4269078be4fd5ca999dcb6244" id="r_aa2006fa4269078be4fd5ca999dcb6244"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespacesf.html#a701020eb396e62ba560619e68c689a38">FloatRect</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="#aa2006fa4269078be4fd5ca999dcb6244">getViewport</a> () const</td></tr>
|
|
<tr class="memdesc:aa2006fa4269078be4fd5ca999dcb6244"><td class="mdescLeft"> </td><td class="mdescRight">Get the target viewport rectangle of the view. <br /></td></tr>
|
|
<tr class="separator:aa2006fa4269078be4fd5ca999dcb6244"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a46ea8dd5eff1148b0bd54e4270a7a0ce" id="r_a46ea8dd5eff1148b0bd54e4270a7a0ce"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="namespacesf.html#a701020eb396e62ba560619e68c689a38">FloatRect</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="#a46ea8dd5eff1148b0bd54e4270a7a0ce">getScissor</a> () const</td></tr>
|
|
<tr class="memdesc:a46ea8dd5eff1148b0bd54e4270a7a0ce"><td class="mdescLeft"> </td><td class="mdescRight">Get the scissor rectangle of the view. <br /></td></tr>
|
|
<tr class="separator:a46ea8dd5eff1148b0bd54e4270a7a0ce"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a5df7c26db6583f0a59bc0522b27348f1" id="r_a5df7c26db6583f0a59bc0522b27348f1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a5df7c26db6583f0a59bc0522b27348f1">move</a> (<a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a> offset)</td></tr>
|
|
<tr class="memdesc:a5df7c26db6583f0a59bc0522b27348f1"><td class="mdescLeft"> </td><td class="mdescRight">Move the view relatively to its current position. <br /></td></tr>
|
|
<tr class="separator:a5df7c26db6583f0a59bc0522b27348f1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a23c24a1ec48c3e50aba2307adaddaf93" id="r_a23c24a1ec48c3e50aba2307adaddaf93"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a23c24a1ec48c3e50aba2307adaddaf93">rotate</a> (<a class="el" href="classsf_1_1Angle.html">Angle</a> angle)</td></tr>
|
|
<tr class="memdesc:a23c24a1ec48c3e50aba2307adaddaf93"><td class="mdescLeft"> </td><td class="mdescRight">Rotate the view relatively to its current orientation. <br /></td></tr>
|
|
<tr class="separator:a23c24a1ec48c3e50aba2307adaddaf93"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4a72a360a5792fbe4e99cd6feaf7726e" id="r_a4a72a360a5792fbe4e99cd6feaf7726e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a4a72a360a5792fbe4e99cd6feaf7726e">zoom</a> (float factor)</td></tr>
|
|
<tr class="memdesc:a4a72a360a5792fbe4e99cd6feaf7726e"><td class="mdescLeft"> </td><td class="mdescRight">Resize the view rectangle relatively to its current size. <br /></td></tr>
|
|
<tr class="separator:a4a72a360a5792fbe4e99cd6feaf7726e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac9c1dab0cb8c1ac143b031035d821ce5" id="r_ac9c1dab0cb8c1ac143b031035d821ce5"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Transform.html">Transform</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="#ac9c1dab0cb8c1ac143b031035d821ce5">getTransform</a> () const</td></tr>
|
|
<tr class="memdesc:ac9c1dab0cb8c1ac143b031035d821ce5"><td class="mdescLeft"> </td><td class="mdescRight">Get the projection transform of the view. <br /></td></tr>
|
|
<tr class="separator:ac9c1dab0cb8c1ac143b031035d821ce5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa685c17a56aae7c7df4c90ea6285fd46" id="r_aa685c17a56aae7c7df4c90ea6285fd46"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classsf_1_1Transform.html">Transform</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="#aa685c17a56aae7c7df4c90ea6285fd46">getInverseTransform</a> () const</td></tr>
|
|
<tr class="memdesc:aa685c17a56aae7c7df4c90ea6285fd46"><td class="mdescLeft"> </td><td class="mdescRight">Get the inverse projection transform of the view. <br /></td></tr>
|
|
<tr class="separator:aa685c17a56aae7c7df4c90ea6285fd46"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>2D camera that defines what region is shown on screen </p>
|
|
<p><code><a class="el" href="classsf_1_1View.html" title="2D camera that defines what region is shown on screen">sf::View</a></code> defines a camera in the 2D scene.</p>
|
|
<p>This is a very powerful concept: you can scroll, rotate or zoom the entire scene without altering the way that your drawable objects are drawn.</p>
|
|
<p>A view is composed of a source rectangle, which defines what part of the 2D scene is shown, and a target viewport, which defines where the contents of the source rectangle will be displayed on the render target (window or texture).</p>
|
|
<p>The viewport allows to map the scene to a custom part of the render target, and can be used for split-screen or for displaying a minimap, for example. If the source rectangle doesn't have the same size as the viewport, its contents will be stretched to fit in.</p>
|
|
<p>The scissor rectangle allows for specifying regions of the render target to which modifications can be made by draw and clear operations. Only pixels that are within the region will be able to be modified. Pixels outside of the region will not be modified by draw or clear operations.</p>
|
|
<p>Certain effects can be created by either using the viewport or scissor rectangle. While the results appear identical, there can be times where one method should be preferred over the other. Viewport transformations are applied during the vertex processing stage of the graphics pipeline, before the primitives are rasterized into fragments for fragment processing. Since viewport processing has to be performed and cannot be disabled, effects that are performed using the viewport transform are basically free performance-wise. Scissor testing is performed in the per-sample processing stage of the graphics pipeline, after fragment processing has been performed. Because per-sample processing is performed at the last stage of the pipeline, fragments that are discarded at this stage will cause the highest waste of GPU resources compared to any method that would have discarded vertices or fragments earlier in the pipeline. There are situations in which scissor testing has to be used to control whether fragments are discarded or not. An example of such a situation is when performing the viewport transform on vertices is necessary but a subset of the generated fragments should not have an effect on the stencil buffer or blend with the color buffer. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="View_8hpp_source.html#l00045">45</a> of file <a class="el" href="View_8hpp_source.html">View.hpp</a>.</p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="a7405abaa98a7772b4ad7490d213c8941" name="a7405abaa98a7772b4ad7490d213c8941"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7405abaa98a7772b4ad7490d213c8941">◆ </a></span>View() <span class="overload">[1/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">sf::View::View </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">default</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Default constructor. </p>
|
|
<p>This constructor creates a default view of (0, 0, 1000, 1000) </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a1d63bc49e041b3b1ff992bb6430e1326" name="a1d63bc49e041b3b1ff992bb6430e1326"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1d63bc49e041b3b1ff992bb6430e1326">◆ </a></span>View() <span class="overload">[2/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">sf::View::View </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacesf.html#a701020eb396e62ba560619e68c689a38">FloatRect</a> &</td> <td class="paramname"><span class="paramname"><em>rectangle</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Construct the view from a rectangle. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">rectangle</td><td>Rectangle defining the zone to display </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a01eb9b64eb8944ea012936f56268ce18" name="a01eb9b64eb8944ea012936f56268ce18"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a01eb9b64eb8944ea012936f56268ce18">◆ </a></span>View() <span class="overload">[3/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">sf::View::View </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a></td> <td class="paramname"><span class="paramname"><em>center</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a></td> <td class="paramname"><span class="paramname"><em>size</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Construct the view from its center and size. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">center</td><td>Center of the zone to display </td></tr>
|
|
<tr><td class="paramname">size</td><td>Size of zone to display </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="aadd146fcb51b838c935bdc487f171247" name="aadd146fcb51b838c935bdc487f171247"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aadd146fcb51b838c935bdc487f171247">◆ </a></span>getCenter()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a> sf::View::getCenter </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the center of the view. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Center of the view</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a4e5953e811413746fce3e134bd778416" title="Get the size of the view.">getSize</a></code>, <code><a class="el" href="#a27c800522c013ccbd4ac2b6f321b4376" title="Set the center of the view.">setCenter</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa685c17a56aae7c7df4c90ea6285fd46" name="aa685c17a56aae7c7df4c90ea6285fd46"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa685c17a56aae7c7df4c90ea6285fd46">◆ </a></span>getInverseTransform()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const <a class="el" href="classsf_1_1Transform.html">Transform</a> & sf::View::getInverseTransform </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the inverse projection transform of the view. </p>
|
|
<p>This function is meant for internal use only.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Inverse of the projection transform defining the view</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#ac9c1dab0cb8c1ac143b031035d821ce5" title="Get the projection transform of the view.">getTransform</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a5b61f4e9d09024cbf9a5b2cdc314e693" name="a5b61f4e9d09024cbf9a5b2cdc314e693"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a5b61f4e9d09024cbf9a5b2cdc314e693">◆ </a></span>getRotation()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1Angle.html">Angle</a> sf::View::getRotation </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the current orientation of the view. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Rotation angle of the view</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a73a27e9e90f4f00e0783fa2e771dfa98" title="Set the orientation of the view.">setRotation</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a46ea8dd5eff1148b0bd54e4270a7a0ce" name="a46ea8dd5eff1148b0bd54e4270a7a0ce"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a46ea8dd5eff1148b0bd54e4270a7a0ce">◆ </a></span>getScissor()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const <a class="el" href="namespacesf.html#a701020eb396e62ba560619e68c689a38">FloatRect</a> & sf::View::getScissor </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the scissor rectangle of the view. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Scissor rectangle, expressed as a factor of the target size</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a51029b20359f9889f4e0ad8c8254abc9" title="Set the target scissor rectangle.">setScissor</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4e5953e811413746fce3e134bd778416" name="a4e5953e811413746fce3e134bd778416"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4e5953e811413746fce3e134bd778416">◆ </a></span>getSize()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a> sf::View::getSize </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the size of the view. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Size of the view</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#aadd146fcb51b838c935bdc487f171247" title="Get the center of the view.">getCenter</a></code>, <code><a class="el" href="#a49ad66679cd7a461917eaee587020354" title="Set the size of the view.">setSize</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac9c1dab0cb8c1ac143b031035d821ce5" name="ac9c1dab0cb8c1ac143b031035d821ce5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac9c1dab0cb8c1ac143b031035d821ce5">◆ </a></span>getTransform()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const <a class="el" href="classsf_1_1Transform.html">Transform</a> & sf::View::getTransform </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the projection transform of the view. </p>
|
|
<p>This function is meant for internal use only.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Projection transform defining the view</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#aa685c17a56aae7c7df4c90ea6285fd46" title="Get the inverse projection transform of the view.">getInverseTransform</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa2006fa4269078be4fd5ca999dcb6244" name="aa2006fa4269078be4fd5ca999dcb6244"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa2006fa4269078be4fd5ca999dcb6244">◆ </a></span>getViewport()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">const <a class="el" href="namespacesf.html#a701020eb396e62ba560619e68c689a38">FloatRect</a> & sf::View::getViewport </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the target viewport rectangle of the view. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Viewport rectangle, expressed as a factor of the target size</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a8eaec46b7d332fe834f016d0187d4b4a" title="Set the target viewport.">setViewport</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a5df7c26db6583f0a59bc0522b27348f1" name="a5df7c26db6583f0a59bc0522b27348f1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a5df7c26db6583f0a59bc0522b27348f1">◆ </a></span>move()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::View::move </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a></td> <td class="paramname"><span class="paramname"><em>offset</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Move the view relatively to its current position. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">offset</td><td>Move offset</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a27c800522c013ccbd4ac2b6f321b4376" title="Set the center of the view.">setCenter</a></code>, <code><a class="el" href="#a23c24a1ec48c3e50aba2307adaddaf93" title="Rotate the view relatively to its current orientation.">rotate</a></code>, <code><a class="el" href="#a4a72a360a5792fbe4e99cd6feaf7726e" title="Resize the view rectangle relatively to its current size.">zoom</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a23c24a1ec48c3e50aba2307adaddaf93" name="a23c24a1ec48c3e50aba2307adaddaf93"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a23c24a1ec48c3e50aba2307adaddaf93">◆ </a></span>rotate()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::View::rotate </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1Angle.html">Angle</a></td> <td class="paramname"><span class="paramname"><em>angle</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Rotate the view relatively to its current orientation. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">angle</td><td><a class="el" href="classsf_1_1Angle.html" title="Represents an angle value.">Angle</a> to rotate</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a73a27e9e90f4f00e0783fa2e771dfa98" title="Set the orientation of the view.">setRotation</a></code>, <code><a class="el" href="#a5df7c26db6583f0a59bc0522b27348f1" title="Move the view relatively to its current position.">move</a></code>, <code><a class="el" href="#a4a72a360a5792fbe4e99cd6feaf7726e" title="Resize the view rectangle relatively to its current size.">zoom</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a27c800522c013ccbd4ac2b6f321b4376" name="a27c800522c013ccbd4ac2b6f321b4376"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a27c800522c013ccbd4ac2b6f321b4376">◆ </a></span>setCenter()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::View::setCenter </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a></td> <td class="paramname"><span class="paramname"><em>center</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the center of the view. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">center</td><td>New center</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a49ad66679cd7a461917eaee587020354" title="Set the size of the view.">setSize</a></code>, <code><a class="el" href="#aadd146fcb51b838c935bdc487f171247" title="Get the center of the view.">getCenter</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a73a27e9e90f4f00e0783fa2e771dfa98" name="a73a27e9e90f4f00e0783fa2e771dfa98"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a73a27e9e90f4f00e0783fa2e771dfa98">◆ </a></span>setRotation()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::View::setRotation </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1Angle.html">Angle</a></td> <td class="paramname"><span class="paramname"><em>angle</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the orientation of the view. </p>
|
|
<p>The default rotation of a view is 0 degree.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">angle</td><td>New angle</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a5b61f4e9d09024cbf9a5b2cdc314e693" title="Get the current orientation of the view.">getRotation</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a51029b20359f9889f4e0ad8c8254abc9" name="a51029b20359f9889f4e0ad8c8254abc9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a51029b20359f9889f4e0ad8c8254abc9">◆ </a></span>setScissor()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::View::setScissor </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacesf.html#a701020eb396e62ba560619e68c689a38">FloatRect</a> &</td> <td class="paramname"><span class="paramname"><em>scissor</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the target scissor rectangle. </p>
|
|
<p>The scissor rectangle, expressed as a factor (between 0 and 1) of the <a class="el" href="classsf_1_1RenderTarget.html" title="Base class for all render targets (window, texture, ...)">RenderTarget</a>, specifies the region of the <a class="el" href="classsf_1_1RenderTarget.html" title="Base class for all render targets (window, texture, ...)">RenderTarget</a> whose pixels are able to be modified by draw or clear operations. Any pixels which lie outside of the scissor rectangle will not be modified by draw or clear operations. For example, a scissor rectangle which only allows modifications to the right side of the target would be defined with <code>view.setScissor(<a class="el" href="namespacesf.html#a701020eb396e62ba560619e68c689a38">sf::FloatRect</a>({0.5f, 0.f}, {0.5f, 1.f}))</code>. By default, a view has a scissor rectangle which allows modifications to the entire target. This is equivalent to disabling the scissor test entirely. Passing the default scissor rectangle to this function will also disable scissor testing.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">scissor</td><td>New scissor rectangle</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a46ea8dd5eff1148b0bd54e4270a7a0ce" title="Get the scissor rectangle of the view.">getScissor</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a49ad66679cd7a461917eaee587020354" name="a49ad66679cd7a461917eaee587020354"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a49ad66679cd7a461917eaee587020354">◆ </a></span>setSize()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::View::setSize </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="namespacesf.html#af14b40e82368dd601a7ef8037214804d">Vector2f</a></td> <td class="paramname"><span class="paramname"><em>size</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the size of the view. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">size</td><td>New size</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a27c800522c013ccbd4ac2b6f321b4376" title="Set the center of the view.">setCenter</a></code>, <code><a class="el" href="#aadd146fcb51b838c935bdc487f171247" title="Get the center of the view.">getCenter</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a8eaec46b7d332fe834f016d0187d4b4a" name="a8eaec46b7d332fe834f016d0187d4b4a"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8eaec46b7d332fe834f016d0187d4b4a">◆ </a></span>setViewport()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::View::setViewport </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacesf.html#a701020eb396e62ba560619e68c689a38">FloatRect</a> &</td> <td class="paramname"><span class="paramname"><em>viewport</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the target viewport. </p>
|
|
<p>The viewport is the rectangle into which the contents of the view are displayed, expressed as a factor (between 0 and 1) of the size of the <a class="el" href="classsf_1_1RenderTarget.html" title="Base class for all render targets (window, texture, ...)">RenderTarget</a> to which the view is applied. For example, a view which takes the left side of the target would be defined with <code>view.setViewport(<a class="el" href="namespacesf.html#a701020eb396e62ba560619e68c689a38">sf::FloatRect</a>({0.f, 0.f}, {0.5f, 1.f}))</code>. By default, a view has a viewport which covers the entire target.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">viewport</td><td>New viewport rectangle</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#aa2006fa4269078be4fd5ca999dcb6244" title="Get the target viewport rectangle of the view.">getViewport</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4a72a360a5792fbe4e99cd6feaf7726e" name="a4a72a360a5792fbe4e99cd6feaf7726e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4a72a360a5792fbe4e99cd6feaf7726e">◆ </a></span>zoom()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::View::zoom </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>factor</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Resize the view rectangle relatively to its current size. </p>
|
|
<p>Resizing the view simulates a zoom, as the zone displayed on screen grows or shrinks. <em>factor</em> is a multiplier: </p><ul>
|
|
<li>1 keeps the size unchanged </li>
|
|
<li>> 1 makes the view bigger (objects appear smaller) </li>
|
|
<li>< 1 makes the view smaller (objects appear bigger)</li>
|
|
</ul>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">factor</td><td>Zoom factor to apply</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a49ad66679cd7a461917eaee587020354" title="Set the size of the view.">setSize</a></code>, <code><a class="el" href="#a5df7c26db6583f0a59bc0522b27348f1" title="Move the view relatively to its current position.">move</a></code>, <code><a class="el" href="#a23c24a1ec48c3e50aba2307adaddaf93" title="Rotate the view relatively to its current orientation.">rotate</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="View_8hpp_source.html">View.hpp</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
</div>
|
|
<div id="footer-container">
|
|
<div id="footer">
|
|
SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br />
|
|
Copyright © Laurent Gomila ::
|
|
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> ::
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|