La bibliothèque se documente elle-même · Graphisme
stzWindow
32 méthodes propres · 4 formes avec extensions, rangées sous leur méthode
la source: base/graphics/stzWindow.ring(s'ouvre dans un nouvel onglet) · Toutes les classes · La référence du domaine : Graphisme
Sous chaque méthode, ses extensions (Q CS XT Z ZZ IB W U) : en gras et cochée, elle existe ; barrée, elle n'existe pas. Les extensions et leur sens
Aucune méthode de cette classe n'est exécutée sur cette page : la classe touche aux fichiers, au réseau, aux processus, à l'horloge, au hasard ou au son, et un exemple exécuté ici ne serait que l'exemple de ses effets. Chaque méthode porte l'explication que la bibliothèque donne d'elle-même.
Méthode
Explication, telle que la source la porte
init
(sans commentaire dans la source : le nom se lit comme une phrase) initaucune extension
Id_
(sans commentaire dans la source : le nom se lit comme une phrase) id_aucune extension
NativeHandle
It crosses as an f64, which holds integers exactly to 2^53. Real handles sit far below that on every platform here, but a caller that means to pass it back to a C API should check rather than assume -- the house has already paid once for an f64 boundary, on epoch nanos.aucune extension
NativeDisplay
The X11 Display pointer, which AT-SPI needs alongside the window id. 0 on Windows and macOS, where the handle alone is the whole address.aucune extension
IsOpen
state --------------------------------------------------------------- TRUE until the user closes it (the X button, Alt-F4) or Close() is called. This is the `while` condition of every frame loop.aucune extension
CanDraw
(sans commentaire dans la source : le nom se lit comme une phrase) can drawaucune extension
Width
(sans commentaire dans la source : le nom se lit comme une phrase) widthaucune extension
Height
(sans commentaire dans la source : le nom se lit comme une phrase) heightaucune extension
Title
(sans commentaire dans la source : le nom se lit comme une phrase) titleaucune extension
SetTitle
(sans commentaire dans la source : le nom se lit comme une phrase) set titleQCSXTZZZIBWU
SetSize
Resize from code. The size lands at the next Poll(), which is also where the swapchain reconfigures -- so this drives exactly the path a dragged window edge drives, and that is why it exists: without it the resize path could only ever be tested by a person with a mouse.QCSXTZZZIBWU
WasResized
TRUE for the frame in which the user finished resizing. The surface is reconfigured HERE rather than in Draw(), so a caller that wants to re-lay-out its picture can do so before anything is drawn at the new size.aucune extension
Poll
the frame ----------------------------------------------------------- Pump the OS event queue and SAMPLE input. Everything the frame then reads -- keys, mouse, size, delta -- describes the same instant, so two reads in one frame cannot disagree with each other.QCSXTZZZIBWU
DeltaTime
Seconds since the previous Poll(). Multiply speeds by this and motion stops depending on how fast the machine happens to be -- the one number that separates an animation from a slideshow.aucune extension
FrameCount
(sans commentaire dans la source : le nom se lit comme une phrase) frame countaucune extension
FPS
Frames per second implied by the last frame's delta. An INSTANT rate, not an average -- it jitters, and a caller that wants a smooth number should average it themselves rather than be handed a lie.aucune extension
Draw
(sans commentaire dans la source : le nom se lit comme une phrase) drawQCSXTZZZIBWU
KeyDown
HELD vs PRESSED, and why a loop needs both: KeyDown answers "is it down right now" -- true every frame you hold it, which is what movement wants. KeyPressed answers "did it go down since the last Poll" -- true exactly once per physical press, which is what a command wants. Written with only the first, pressing P once pauses and unpauses sixty times.aucune extension
KeyPressed
(sans commentaire dans la source : le nom se lit comme une phrase) key pressedaucune extension
MouseX
(sans commentaire dans la source : le nom se lit comme une phrase) mouse xaucune extension
MouseY
(sans commentaire dans la source : le nom se lit comme une phrase) mouse yaucune extension
MousePosition
(sans commentaire dans la source : le nom se lit comme une phrase) mouse positionaucune extension
MouseDown
button: 1 = left, 2 = right, 3 = middle (as a person counts them, not as the C API indexes them)aucune extension
MouseClicked
(sans commentaire dans la source : le nom se lit comme une phrase) mouse clickedaucune extension
SetVSync
presentation knobs -------------------------------------------------- VSync ON (the default) caps the loop at the monitor's refresh and never tears. OFF runs as fast as the card allows -- the honest way to MEASURE frame cost, and the wrong way to ship. Answers FALSE when the card refuses the mode rather than pretending it changed.aucune extension
VSync
(sans commentaire dans la source : le nom se lit comme une phrase) v syncaucune extension
SurfaceFormat
(sans commentaire dans la source : le nom se lit comme une phrase) surface formataucune extension
Stats
[ width, height, framesPresented, reconfigures, frameHeld, presentMode ]aucune extension
Show
the two convenience loops ------------------------------------------- Show a still picture and wait. Escape or the X button closes it. This is what stzCanvas.Show() now calls -- the same picture that used to be written to a PNG and opened in whatever the OS felt like.aucune extension
EachFrame
Run a frame loop, calling pFunc(This) once per frame until the window closes. The anonymous function does the updating and the drawing; this only owns the pump. Escape closes, because a window with no way out is a bug in every program that ever shipped one.aucune extension
Close
lifetimeaucune extension
Free
(sans commentaire dans la source : le nom se lit comme une phrase) freeaucune extension

