1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>pygame.sdl2_video — pygame v2.1.2 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/pygame.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<link rel="shortcut icon" href="../_static/pygame.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="pygame.sndarray" href="sndarray.html" />
<link rel="prev" title="pygame._sdl2.controller" href="sdl2_controller.html" />
</head><body>
<div class="document">
<div class="header">
<table>
<tr>
<td class="logo">
<a href="https://www.pygame.org/">
<img src="../_static/pygame_tiny.png"/>
</a>
<h5>pygame documentation</h5>
</td>
<td class="pagelinks">
<div class="top">
<a href="https://www.pygame.org/">Pygame Home</a> ||
<a href="../index.html">Help Contents</a> ||
<a href="../genindex.html">Reference Index</a>
<form action="../search.html" method="get" style="display:inline;float:right;">
<input name="q" value="" type="text">
<input value="search" type="submit">
</form>
</div>
<hr style="color:black;border-bottom:none;border-style: dotted;border-bottom-style:none;">
<p class="bottom"><b>Most useful stuff</b>:
<a href="color.html">Color</a> |
<a href="display.html">display</a> |
<a href="draw.html">draw</a> |
<a href="event.html">event</a> |
<a href="font.html">font</a> |
<a href="image.html">image</a> |
<a href="key.html">key</a> |
<a href="locals.html">locals</a> |
<a href="mixer.html">mixer</a> |
<a href="mouse.html">mouse</a> |
<a href="rect.html">Rect</a> |
<a href="surface.html">Surface</a> |
<a href="time.html">time</a> |
<a href="music.html">music</a> |
<a href="pygame.html">pygame</a>
</p>
<p class="bottom"><b>Advanced stuff</b>:
<a href="cursors.html">cursors</a> |
<a href="joystick.html">joystick</a> |
<a href="mask.html">mask</a> |
<a href="sprite.html">sprite</a> |
<a href="transform.html">transform</a> |
<a href="bufferproxy.html">BufferProxy</a> |
<a href="freetype.html">freetype</a> |
<a href="gfxdraw.html">gfxdraw</a> |
<a href="midi.html">midi</a> |
<a href="pixelarray.html">PixelArray</a> |
<a href="pixelcopy.html">pixelcopy</a> |
<a href="sndarray.html">sndarray</a> |
<a href="surfarray.html">surfarray</a> |
<a href="math.html">math</a>
</p>
<p class="bottom"><b>Other</b>:
<a href="camera.html">camera</a> |
<a href="sdl2_controller.html#module-pygame._sdl2.controller">controller</a> |
<a href="examples.html">examples</a> |
<a href="fastevent.html">fastevent</a> |
<a href="scrap.html">scrap</a> |
<a href="tests.html">tests</a> |
<a href="touch.html">touch</a> |
<a href="pygame.html#module-pygame.version">version</a>
</p>
</td>
</tr>
</table>
</div>
<div class="documentwrapper">
<div class="body" role="main">
<section id="module-pygame._sdl2.video">
<span id="pygame-sdl2-video"></span><dl class="definition">
<dt class="title module sig sig-object">
<code class="docutils literal notranslate"><span class="pre">pygame.sdl2_video</span></code></dt>
<dd><div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>This module isn't ready for prime time yet, it's still in development.
These docs are primarily meant to help the pygame developers and super-early adopters
who are in communication with the developers. This API will change.</p>
</div>
<table class="toc docutils align-default">
<colgroup>
<col style="width: 24%" />
<col style="width: 1%" />
<col style="width: 76%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window">pygame._sdl2.video.Window</a></div>
</td>
<td>—</td>
<td>pygame object that represents a window</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Texture">pygame._sdl2.video.Texture</a></div>
</td>
<td>—</td>
<td>pygame object that representing a Texture.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Image">pygame._sdl2.video.Image</a></div>
</td>
<td>—</td>
<td>Easy way to use a portion of a Texture without worrying about srcrect all the time.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer">pygame._sdl2.video.Renderer</a></div>
</td>
<td>—</td>
<td>Create a 2D rendering context for a window.</td>
</tr>
</tbody>
</table>
<div class="line-block">
<div class="line"><span class="summaryline">Experimental pygame module for porting new SDL video systems</span></div>
</div>
<dl class="py class definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window">
<span class="sig-prename descclassname"><span class="pre">pygame._sdl2.video.</span></span><span class="sig-name descname"><span class="pre">Window</span></span><a class="headerlink" href="#pygame._sdl2.video.Window" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">pygame object that represents a window</span></div>
<div class="line"><span class="signature">Window(title="pygame", size=(640, 480), position=None, fullscreen=False, fullscreen_desktop=False, keywords) -> Window</span></div>
</div>
<table class="toc docutils align-default">
<colgroup>
<col style="width: 27%" />
<col style="width: 1%" />
<col style="width: 72%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.from_display_module">pygame._sdl2.video.Window.from_display_module</a></div>
</td>
<td>—</td>
<td>Creates window using window created by pygame.display.set_mode().</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.grab">pygame._sdl2.video.Window.grab</a></div>
</td>
<td>—</td>
<td>Gets or sets whether the mouse is confined to the window.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.relative_mouse">pygame._sdl2.video.Window.relative_mouse</a></div>
</td>
<td>—</td>
<td>Gets or sets the window's relative mouse motion state.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.set_windowed">pygame._sdl2.video.Window.set_windowed</a></div>
</td>
<td>—</td>
<td>Enable windowed mode (exit fullscreen).</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.set_fullscreen">pygame._sdl2.video.Window.set_fullscreen</a></div>
</td>
<td>—</td>
<td>Enter fullscreen.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.title">pygame._sdl2.video.Window.title</a></div>
</td>
<td>—</td>
<td>Gets or sets whether the window title.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.destroy">pygame._sdl2.video.Window.destroy</a></div>
</td>
<td>—</td>
<td>Destroys the window.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.hide">pygame._sdl2.video.Window.hide</a></div>
</td>
<td>—</td>
<td>Hide the window.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.show">pygame._sdl2.video.Window.show</a></div>
</td>
<td>—</td>
<td>Show the window.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.focus">pygame._sdl2.video.Window.focus</a></div>
</td>
<td>—</td>
<td>Raise the window above other windows and set the input focus. The "input_only" argument is only supported on X11.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.restore">pygame._sdl2.video.Window.restore</a></div>
</td>
<td>—</td>
<td>Restore the size and position of a minimized or maximized window.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.maximize">pygame._sdl2.video.Window.maximize</a></div>
</td>
<td>—</td>
<td>Maximize the window.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.minimize">pygame._sdl2.video.Window.minimize</a></div>
</td>
<td>—</td>
<td>Minimize the window.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.resizable">pygame._sdl2.video.Window.resizable</a></div>
</td>
<td>—</td>
<td>Gets and sets whether the window is resizable.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.borderless">pygame._sdl2.video.Window.borderless</a></div>
</td>
<td>—</td>
<td>Add or remove the border from the window.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.set_icon">pygame._sdl2.video.Window.set_icon</a></div>
</td>
<td>—</td>
<td>Set the icon for the window.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.id">pygame._sdl2.video.Window.id</a></div>
</td>
<td>—</td>
<td>Get the unique window ID. *Read-only*</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.size">pygame._sdl2.video.Window.size</a></div>
</td>
<td>—</td>
<td>Gets and sets the window size.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.position">pygame._sdl2.video.Window.position</a></div>
</td>
<td>—</td>
<td>Gets and sets the window position.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.opacity">pygame._sdl2.video.Window.opacity</a></div>
</td>
<td>—</td>
<td>Gets and sets the window opacity. Between 0.0 (fully transparent) and 1.0 (fully opaque).</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.brightness">pygame._sdl2.video.Window.brightness</a></div>
</td>
<td>—</td>
<td>Gets and sets the brightness (gamma multiplier) for the display that owns the window.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.display_index">pygame._sdl2.video.Window.display_index</a></div>
</td>
<td>—</td>
<td>Get the index of the display that owns the window. *Read-only*</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Window.set_modal_for">pygame._sdl2.video.Window.set_modal_for</a></div>
</td>
<td>—</td>
<td>Set the window as a modal for a parent window. This function is only supported on X11.</td>
</tr>
</tbody>
</table>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.from_display_module">
<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_display_module</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Window.from_display_module" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Creates window using window created by pygame.display.set_mode().</span></div>
<div class="line"><span class="signature">from_display_module() -> Window</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.grab">
<span class="sig-name descname"><span class="pre">grab</span></span><a class="headerlink" href="#pygame._sdl2.video.Window.grab" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets or sets whether the mouse is confined to the window.</span></div>
<div class="line"><span class="signature">grab -> bool</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.relative_mouse">
<span class="sig-name descname"><span class="pre">relative_mouse</span></span><a class="headerlink" href="#pygame._sdl2.video.Window.relative_mouse" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets or sets the window's relative mouse motion state.</span></div>
<div class="line"><span class="signature">relative_mouse -> bool</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.set_windowed">
<span class="sig-name descname"><span class="pre">set_windowed</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Window.set_windowed" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Enable windowed mode (exit fullscreen).</span></div>
<div class="line"><span class="signature">set_windowed() -> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.set_fullscreen">
<span class="sig-name descname"><span class="pre">set_fullscreen</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Window.set_fullscreen" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Enter fullscreen.</span></div>
<div class="line"><span class="signature">set_fullscreen(desktop=False) -> None</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.title">
<span class="sig-name descname"><span class="pre">title</span></span><a class="headerlink" href="#pygame._sdl2.video.Window.title" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets or sets whether the window title.</span></div>
<div class="line"><span class="signature">title -> string</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.destroy">
<span class="sig-name descname"><span class="pre">destroy</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Window.destroy" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Destroys the window.</span></div>
<div class="line"><span class="signature">destroy() -> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.hide">
<span class="sig-name descname"><span class="pre">hide</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Window.hide" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Hide the window.</span></div>
<div class="line"><span class="signature">hide() -> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.show">
<span class="sig-name descname"><span class="pre">show</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Window.show" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Show the window.</span></div>
<div class="line"><span class="signature">show() -> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.focus">
<span class="sig-name descname"><span class="pre">focus</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Window.focus" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Raise the window above other windows and set the input focus. The "input_only" argument is only supported on X11.</span></div>
<div class="line"><span class="signature">focus(input_only=False) -> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.restore">
<span class="sig-name descname"><span class="pre">restore</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Window.restore" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Restore the size and position of a minimized or maximized window.</span></div>
<div class="line"><span class="signature">restore() -> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.maximize">
<span class="sig-name descname"><span class="pre">maximize</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Window.maximize" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Maximize the window.</span></div>
<div class="line"><span class="signature">maximize() -> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.minimize">
<span class="sig-name descname"><span class="pre">minimize</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Window.minimize" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Minimize the window.</span></div>
<div class="line"><span class="signature">maximize() -> None</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.resizable">
<span class="sig-name descname"><span class="pre">resizable</span></span><a class="headerlink" href="#pygame._sdl2.video.Window.resizable" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets whether the window is resizable.</span></div>
<div class="line"><span class="signature">resizable -> bool</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.borderless">
<span class="sig-name descname"><span class="pre">borderless</span></span><a class="headerlink" href="#pygame._sdl2.video.Window.borderless" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Add or remove the border from the window.</span></div>
<div class="line"><span class="signature">borderless -> bool</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.set_icon">
<span class="sig-name descname"><span class="pre">set_icon</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Window.set_icon" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Set the icon for the window.</span></div>
<div class="line"><span class="signature">set_icon(surface) -> None</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.id">
<span class="sig-name descname"><span class="pre">id</span></span><a class="headerlink" href="#pygame._sdl2.video.Window.id" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Get the unique window ID. *Read-only*</span></div>
<div class="line"><span class="signature">id -> int</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.size">
<span class="sig-name descname"><span class="pre">size</span></span><a class="headerlink" href="#pygame._sdl2.video.Window.size" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the window size.</span></div>
<div class="line"><span class="signature">size -> (int, int)</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.position">
<span class="sig-name descname"><span class="pre">position</span></span><a class="headerlink" href="#pygame._sdl2.video.Window.position" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the window position.</span></div>
<div class="line"><span class="signature">position -> (int, int) or WINDOWPOS_CENTERED or WINDOWPOS_UNDEFINED</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.opacity">
<span class="sig-name descname"><span class="pre">opacity</span></span><a class="headerlink" href="#pygame._sdl2.video.Window.opacity" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the window opacity. Between 0.0 (fully transparent) and 1.0 (fully opaque).</span></div>
<div class="line"><span class="signature">opacity -> float</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.brightness">
<span class="sig-name descname"><span class="pre">brightness</span></span><a class="headerlink" href="#pygame._sdl2.video.Window.brightness" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the brightness (gamma multiplier) for the display that owns the window.</span></div>
<div class="line"><span class="signature">brightness -> float</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.display_index">
<span class="sig-name descname"><span class="pre">display_index</span></span><a class="headerlink" href="#pygame._sdl2.video.Window.display_index" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Get the index of the display that owns the window. *Read-only*</span></div>
<div class="line"><span class="signature">display_index -> int</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Window.set_modal_for">
<span class="sig-name descname"><span class="pre">set_modal_for</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Window.set_modal_for" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Set the window as a modal for a parent window. This function is only supported on X11.</span></div>
<div class="line"><span class="signature">set_modal_for(Window) -> None</span></div>
</div>
</dd></dl>
</dd></dl>
<dl class="py class definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Texture">
<span class="sig-prename descclassname"><span class="pre">pygame._sdl2.video.</span></span><span class="sig-name descname"><span class="pre">Texture</span></span><a class="headerlink" href="#pygame._sdl2.video.Texture" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">pygame object that representing a Texture.</span></div>
<div class="line"><span class="signature">Texture(renderer, size, depth=0, static=False, streaming=False, target=False) -> Texture</span></div>
</div>
<table class="toc docutils align-default">
<colgroup>
<col style="width: 31%" />
<col style="width: 1%" />
<col style="width: 68%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Texture.from_surface">pygame._sdl2.video.Texture.from_surface</a></div>
</td>
<td>—</td>
<td>Create a texture from an existing surface.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Texture.renderer">pygame._sdl2.video.Texture.renderer</a></div>
</td>
<td>—</td>
<td>Gets the renderer associated with the Texture. *Read-only*</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Texture.width">pygame._sdl2.video.Texture.width</a></div>
</td>
<td>—</td>
<td>Gets the width of the Texture. *Read-only*</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Texture.height">pygame._sdl2.video.Texture.height</a></div>
</td>
<td>—</td>
<td>Gets the height of the Texture. *Read-only*</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Texture.alpha">pygame._sdl2.video.Texture.alpha</a></div>
</td>
<td>—</td>
<td>Gets and sets an additional alpha value multiplied into render copy operations.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Texture.blend_mode">pygame._sdl2.video.Texture.blend_mode</a></div>
</td>
<td>—</td>
<td>Gets and sets the blend mode for the Texture.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Texture.color">pygame._sdl2.video.Texture.color</a></div>
</td>
<td>—</td>
<td>Gets and sets an additional color value multiplied into render copy operations.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Texture.get_rect">pygame._sdl2.video.Texture.get_rect</a></div>
</td>
<td>—</td>
<td>Get the rectangular area of the texture.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Texture.draw">pygame._sdl2.video.Texture.draw</a></div>
</td>
<td>—</td>
<td>Copy a portion of the texture to the rendering target.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Texture.update">pygame._sdl2.video.Texture.update</a></div>
</td>
<td>—</td>
<td>Update the texture with a Surface. WARNING: Slow operation, use sparingly.</td>
</tr>
</tbody>
</table>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Texture.from_surface">
<em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_surface</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Texture.from_surface" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Create a texture from an existing surface.</span></div>
<div class="line"><span class="signature">from_surface(renderer, surface) -> Texture</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Texture.renderer">
<span class="sig-name descname"><span class="pre">renderer</span></span><a class="headerlink" href="#pygame._sdl2.video.Texture.renderer" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets the renderer associated with the Texture. *Read-only*</span></div>
<div class="line"><span class="signature">renderer -> Renderer</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Texture.width">
<span class="sig-name descname"><span class="pre">width</span></span><a class="headerlink" href="#pygame._sdl2.video.Texture.width" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets the width of the Texture. *Read-only*</span></div>
<div class="line"><span class="signature">width -> int</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Texture.height">
<span class="sig-name descname"><span class="pre">height</span></span><a class="headerlink" href="#pygame._sdl2.video.Texture.height" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets the height of the Texture. *Read-only*</span></div>
<div class="line"><span class="signature">height -> int</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Texture.alpha">
<span class="sig-name descname"><span class="pre">alpha</span></span><a class="headerlink" href="#pygame._sdl2.video.Texture.alpha" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets an additional alpha value multiplied into render copy operations.</span></div>
<div class="line"><span class="signature">alpha -> int</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Texture.blend_mode">
<span class="sig-name descname"><span class="pre">blend_mode</span></span><a class="headerlink" href="#pygame._sdl2.video.Texture.blend_mode" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the blend mode for the Texture.</span></div>
<div class="line"><span class="signature">blend_mode -> int</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Texture.color">
<span class="sig-name descname"><span class="pre">color</span></span><a class="headerlink" href="#pygame._sdl2.video.Texture.color" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets an additional color value multiplied into render copy operations.</span></div>
<div class="line"><span class="signature">color -> color</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Texture.get_rect">
<span class="sig-name descname"><span class="pre">get_rect</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Texture.get_rect" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Get the rectangular area of the texture.</span></div>
<div class="line"><span class="signature">get_rect(**kwargs) -> Rect</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Texture.draw">
<span class="sig-name descname"><span class="pre">draw</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Texture.draw" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Copy a portion of the texture to the rendering target.</span></div>
<div class="line"><span class="signature">draw(srcrect=None, dstrect=None, angle=0, origin=None, flipX=False, flipY=False) -> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Texture.update">
<span class="sig-name descname"><span class="pre">update</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Texture.update" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Update the texture with a Surface. WARNING: Slow operation, use sparingly.</span></div>
<div class="line"><span class="signature">update(surface, area=None) -> None</span></div>
</div>
</dd></dl>
</dd></dl>
<dl class="py class definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Image">
<span class="sig-prename descclassname"><span class="pre">pygame._sdl2.video.</span></span><span class="sig-name descname"><span class="pre">Image</span></span><a class="headerlink" href="#pygame._sdl2.video.Image" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Easy way to use a portion of a Texture without worrying about srcrect all the time.</span></div>
<div class="line"><span class="signature">Image(textureOrImage, srcrect=None) -> Image</span></div>
</div>
<table class="toc docutils align-default">
<colgroup>
<col style="width: 27%" />
<col style="width: 1%" />
<col style="width: 72%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Image.get_rect">pygame._sdl2.video.Image.get_rect</a></div>
</td>
<td>—</td>
<td>Get the rectangular area of the Image.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Image.draw">pygame._sdl2.video.Image.draw</a></div>
</td>
<td>—</td>
<td>Copy a portion of the Image to the rendering target.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Image.angle">pygame._sdl2.video.Image.angle</a></div>
</td>
<td>—</td>
<td>Gets and sets the angle the Image draws itself with.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Image.origin">pygame._sdl2.video.Image.origin</a></div>
</td>
<td>—</td>
<td>Gets and sets the origin. Origin=None means the Image will be rotated around its center.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Image.flipX">pygame._sdl2.video.Image.flipX</a></div>
</td>
<td>—</td>
<td>Gets and sets whether the Image is flipped on the x axis.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Image.flipY">pygame._sdl2.video.Image.flipY</a></div>
</td>
<td>—</td>
<td>Gets and sets whether the Image is flipped on the y axis.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Image.color">pygame._sdl2.video.Image.color</a></div>
</td>
<td>—</td>
<td>Gets and sets the Image color modifier.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Image.alpha">pygame._sdl2.video.Image.alpha</a></div>
</td>
<td>—</td>
<td>Gets and sets the Image alpha modifier.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Image.blend_mode">pygame._sdl2.video.Image.blend_mode</a></div>
</td>
<td>—</td>
<td>Gets and sets the blend mode for the Image.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Image.texture">pygame._sdl2.video.Image.texture</a></div>
</td>
<td>—</td>
<td>Gets and sets the Texture the Image is based on.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Image.srcrect">pygame._sdl2.video.Image.srcrect</a></div>
</td>
<td>—</td>
<td>Gets and sets the Rect the Image is based on.</td>
</tr>
</tbody>
</table>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Image.get_rect">
<span class="sig-name descname"><span class="pre">get_rect</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Image.get_rect" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Get the rectangular area of the Image.</span></div>
<div class="line"><span class="signature">get_rect() -> Rect</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Image.draw">
<span class="sig-name descname"><span class="pre">draw</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Image.draw" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Copy a portion of the Image to the rendering target.</span></div>
<div class="line"><span class="signature">draw(srcrect=None, dstrect=None) -> None</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Image.angle">
<span class="sig-name descname"><span class="pre">angle</span></span><a class="headerlink" href="#pygame._sdl2.video.Image.angle" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the angle the Image draws itself with.</span></div>
<div class="line"><span class="signature">angle -> float</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Image.origin">
<span class="sig-name descname"><span class="pre">origin</span></span><a class="headerlink" href="#pygame._sdl2.video.Image.origin" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the origin. Origin=None means the Image will be rotated around its center.</span></div>
<div class="line"><span class="signature">origin -> (float, float) or None.</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Image.flipX">
<span class="sig-name descname"><span class="pre">flipX</span></span><a class="headerlink" href="#pygame._sdl2.video.Image.flipX" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets whether the Image is flipped on the x axis.</span></div>
<div class="line"><span class="signature">flipX -> bool</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Image.flipY">
<span class="sig-name descname"><span class="pre">flipY</span></span><a class="headerlink" href="#pygame._sdl2.video.Image.flipY" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets whether the Image is flipped on the y axis.</span></div>
<div class="line"><span class="signature">flipY -> bool</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Image.color">
<span class="sig-name descname"><span class="pre">color</span></span><a class="headerlink" href="#pygame._sdl2.video.Image.color" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the Image color modifier.</span></div>
<div class="line"><span class="signature">color -> Color</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Image.alpha">
<span class="sig-name descname"><span class="pre">alpha</span></span><a class="headerlink" href="#pygame._sdl2.video.Image.alpha" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the Image alpha modifier.</span></div>
<div class="line"><span class="signature">alpha -> float</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Image.blend_mode">
<span class="sig-name descname"><span class="pre">blend_mode</span></span><a class="headerlink" href="#pygame._sdl2.video.Image.blend_mode" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the blend mode for the Image.</span></div>
<div class="line"><span class="signature">blend_mode -> int</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Image.texture">
<span class="sig-name descname"><span class="pre">texture</span></span><a class="headerlink" href="#pygame._sdl2.video.Image.texture" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the Texture the Image is based on.</span></div>
<div class="line"><span class="signature">texture -> Texture</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Image.srcrect">
<span class="sig-name descname"><span class="pre">srcrect</span></span><a class="headerlink" href="#pygame._sdl2.video.Image.srcrect" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the Rect the Image is based on.</span></div>
<div class="line"><span class="signature">srcrect -> Rect</span></div>
</div>
</dd></dl>
</dd></dl>
<dl class="py class definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer">
<span class="sig-prename descclassname"><span class="pre">pygame._sdl2.video.</span></span><span class="sig-name descname"><span class="pre">Renderer</span></span><a class="headerlink" href="#pygame._sdl2.video.Renderer" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Create a 2D rendering context for a window.</span></div>
<div class="line"><span class="signature">Renderer(window, index=-1, accelerated=-1, vsync=False, target_texture=False) -> Renderer</span></div>
</div>
<table class="toc docutils align-default">
<colgroup>
<col style="width: 28%" />
<col style="width: 1%" />
<col style="width: 72%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.from_window">pygame._sdl2.video.Renderer.from_window</a></div>
</td>
<td>—</td>
<td>Easy way to create a Renderer.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.draw_blend_mode">pygame._sdl2.video.Renderer.draw_blend_mode</a></div>
</td>
<td>—</td>
<td>Gets and sets the blend mode used by the drawing functions.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.draw_color">pygame._sdl2.video.Renderer.draw_color</a></div>
</td>
<td>—</td>
<td>Gets and sets the color used by the drawing functions.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.clear">pygame._sdl2.video.Renderer.clear</a></div>
</td>
<td>—</td>
<td>Clear the current rendering target with the drawing color.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.present">pygame._sdl2.video.Renderer.present</a></div>
</td>
<td>—</td>
<td>Updates the screen with any new rendering since previous call.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.get_viewport">pygame._sdl2.video.Renderer.get_viewport</a></div>
</td>
<td>—</td>
<td>Returns the drawing area on the target.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.set_viewport">pygame._sdl2.video.Renderer.set_viewport</a></div>
</td>
<td>—</td>
<td>Set the drawing area on the target. If area is None, the entire target will be used.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.logical_size">pygame._sdl2.video.Renderer.logical_size</a></div>
</td>
<td>—</td>
<td>Gets and sets the logical size.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.scale">pygame._sdl2.video.Renderer.scale</a></div>
</td>
<td>—</td>
<td>Gets and sets the scale.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.target">pygame._sdl2.video.Renderer.target</a></div>
</td>
<td>—</td>
<td>Gets and sets the render target. None represents the default target (the renderer).</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.blit">pygame._sdl2.video.Renderer.blit</a></div>
</td>
<td>—</td>
<td>For compatibility purposes. Textures created by different Renderers cannot be shared!</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.draw_line">pygame._sdl2.video.Renderer.draw_line</a></div>
</td>
<td>—</td>
<td>Draws a line.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.draw_point">pygame._sdl2.video.Renderer.draw_point</a></div>
</td>
<td>—</td>
<td>Draws a point.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.draw_rect">pygame._sdl2.video.Renderer.draw_rect</a></div>
</td>
<td>—</td>
<td>Draws a rectangle.</td>
</tr>
<tr class="row-odd"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.fill_rect">pygame._sdl2.video.Renderer.fill_rect</a></div>
</td>
<td>—</td>
<td>Fills a rectangle.</td>
</tr>
<tr class="row-even"><td><div class="line"><a class="toc reference external" href="sdl2_video.html#pygame._sdl2.video.Renderer.to_surface">pygame._sdl2.video.Renderer.to_surface</a></div>
</td>
<td>—</td>
<td>Read pixels from current render target and create a pygame.Surface. WARNING: Slow operation, use sparingly.</td>
</tr>
</tbody>
</table>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.from_window">
<em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_window</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Renderer.from_window" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Easy way to create a Renderer.</span></div>
<div class="line"><span class="signature">from_window(window) -> Renderer</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.draw_blend_mode">
<span class="sig-name descname"><span class="pre">draw_blend_mode</span></span><a class="headerlink" href="#pygame._sdl2.video.Renderer.draw_blend_mode" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the blend mode used by the drawing functions.</span></div>
<div class="line"><span class="signature">draw_blend_mode -> int</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.draw_color">
<span class="sig-name descname"><span class="pre">draw_color</span></span><a class="headerlink" href="#pygame._sdl2.video.Renderer.draw_color" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the color used by the drawing functions.</span></div>
<div class="line"><span class="signature">draw_color -> Color</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.clear">
<span class="sig-name descname"><span class="pre">clear</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Renderer.clear" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Clear the current rendering target with the drawing color.</span></div>
<div class="line"><span class="signature">clear() -> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.present">
<span class="sig-name descname"><span class="pre">present</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Renderer.present" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Updates the screen with any new rendering since previous call.</span></div>
<div class="line"><span class="signature">present() -> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.get_viewport">
<span class="sig-name descname"><span class="pre">get_viewport</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Renderer.get_viewport" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Returns the drawing area on the target.</span></div>
<div class="line"><span class="signature">get_viewport() -> Rect</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.set_viewport">
<span class="sig-name descname"><span class="pre">set_viewport</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Renderer.set_viewport" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Set the drawing area on the target. If area is None, the entire target will be used.</span></div>
<div class="line"><span class="signature">set_viewport(area) -> None</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.logical_size">
<span class="sig-name descname"><span class="pre">logical_size</span></span><a class="headerlink" href="#pygame._sdl2.video.Renderer.logical_size" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the logical size.</span></div>
<div class="line"><span class="signature">logical_size -> (int width, int height)</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.scale">
<span class="sig-name descname"><span class="pre">scale</span></span><a class="headerlink" href="#pygame._sdl2.video.Renderer.scale" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the scale.</span></div>
<div class="line"><span class="signature">scale -> (float x_scale, float y_scale)</span></div>
</div>
</dd></dl>
<dl class="py attribute definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.target">
<span class="sig-name descname"><span class="pre">target</span></span><a class="headerlink" href="#pygame._sdl2.video.Renderer.target" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Gets and sets the render target. None represents the default target (the renderer).</span></div>
<div class="line"><span class="signature">target -> Texture or None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.blit">
<span class="sig-name descname"><span class="pre">blit</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Renderer.blit" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">For compatibility purposes. Textures created by different Renderers cannot be shared!</span></div>
<div class="line"><span class="signature">blit(soure, dest, area=None, special_flags=0)-> Rect</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.draw_line">
<span class="sig-name descname"><span class="pre">draw_line</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Renderer.draw_line" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Draws a line.</span></div>
<div class="line"><span class="signature">draw_line(p1, p2) -> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.draw_point">
<span class="sig-name descname"><span class="pre">draw_point</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Renderer.draw_point" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Draws a point.</span></div>
<div class="line"><span class="signature">draw_point(point) -> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.draw_rect">
<span class="sig-name descname"><span class="pre">draw_rect</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Renderer.draw_rect" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Draws a rectangle.</span></div>
<div class="line"><span class="signature">draw_rect(rect)-> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.fill_rect">
<span class="sig-name descname"><span class="pre">fill_rect</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Renderer.fill_rect" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Fills a rectangle.</span></div>
<div class="line"><span class="signature">fill_rect(rect)-> None</span></div>
</div>
</dd></dl>
<dl class="py method definition">
<dt class="sig sig-object py title" id="pygame._sdl2.video.Renderer.to_surface">
<span class="sig-name descname"><span class="pre">to_surface</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#pygame._sdl2.video.Renderer.to_surface" title="Permalink to this definition">¶</a></dt>
<dd><div class="line-block">
<div class="line"><span class="summaryline">Read pixels from current render target and create a pygame.Surface. WARNING: Slow operation, use sparingly.</span></div>
<div class="line"><span class="signature">to_surface(surface=None, area=None)-> Surface</span></div>
</div>
</dd></dl>
</dd></dl>
</dd></dl>
</section>
<br /><br />
<hr />
<a href="https://github.com/pygame/pygame/edit/main/docs/reST/ref/sdl2_video.rst" rel="nofollow">Edit on GitHub</a>
<div class="clearer"></div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="sndarray.html" title="pygame.sndarray"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="sdl2_controller.html" title="pygame._sdl2.controller"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">pygame v2.1.2 documentation</a> »</li>
<li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">pygame.sdl2_video</span></code></a></li>
<script type="text/javascript" src="https://www.pygame.org/comment/jquery.plugin.docscomments.js"></script>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2000-2021, pygame developers.
</div>
</body>
</html>
|