Difference between revisions of "love.graphics (Français)"

(Enumérations)
(Fenêtre)
Line 74: Line 74:
 
}}
 
}}
 
=== Fenêtre  ===
 
=== Fenêtre  ===
{{#ask: [[Category:Functions]] [[parent::love.graphics]] [[Concept:Current]] [[Sub-Category::Window]]
+
{{#ask: [[Category:Functions (Français)]] [[parent::love.graphics (Français)]] [[Concept:Current]] [[Sub-Category::Window (Français)]]
 
| headers=hide
 
| headers=hide
 
| limit=2000
 
| limit=2000
Line 85: Line 85:
 
| ?PrettyRemoved
 
| ?PrettyRemoved
 
}}
 
}}
 +
 
== Enumérations ==
 
== Enumérations ==
 
{{#ask: [[Category:Enums (Français)]] [[parent::love.graphics (Français)]] [[Concept:Current]]
 
{{#ask: [[Category:Enums (Français)]] [[parent::love.graphics (Français)]] [[Concept:Current]]

Revision as of 14:51, 30 April 2021

La fonction principale du module love.graphics est le dessin de lignes, formes, textes, Images et autres objets Drawable à l'écran. Ses autres fonctionnalités comprennent le chargement de fichiers externes (Images et Fonts) en mémoire, la création d'objets spécialisés (comme un ParticleSystems ou un Canvas) et la gestion de l'écran.

Le système de coordonnées de LÖVE à pour origine le coin supérieur gauche de l'écran, à la position (0, 0). L'axe des abscisses x est horizontal, les valeurs augmentent vers la droite. L'axe des ordonnées y est vertical, les valeurs augmentent vers le bas.

The LÖVE coordinate system

Dans la plupart des cas, les images ou les formes sont dessinées à partir de leur coin supérieur gauche (Voir image ci-dessus).

Beaucoup de fonctions sont utilisées pour manipuler le système de coordonnées graphiques, essentiel pour la façon dont les coordonnées sont disposées sur l'écran. On peut alors changer la position, mettre à l'échelle ou faire pivoter un objet.


Types

Canvas (Français) Rendu d'image hors écran. Added since 0.8.0
Drawable (Français) Super classe pour toutes les choses qui peuvent être dessinées à l'écran.
Font (Français) Définit la forme de caractères qui peuvent être tracés à l'écran.
Framebuffer (Français) Cible de rendu hors écran. Added since 0.7.0 Removed in 0.8.0
Image (Français) type d'image pouvant être dessiné.
Mesh (Français) Un maillage (mesh) polygonal utilisé pour dessiner des formes texturées arbitraires. Added since 0.9.0
ParticleSystem (Français) Utilisé pour créer des effets de particules, tels que du feu ou de la fumée.
PixelEffect (Français) Effet de shader sur les pixels. Added since 0.8.0 Removed in 0.9.0
Quad (Français) Un quadrilatère avec des information de coordonnées de texture.
Shader (Français) Shader effect. Added since 0.9.0
SpriteBatch (Français) Stock des positions d'image dans un tampon, puis les trace en un seul appel.
Text (Français) Texte pouvant être tracé. Added since 0.10.0
Texture (Français) Super classe pour les objets pouvant être tracés (drawable) représentant une texture. Added since 0.9.1
Video (Français) Une vidéo pouvant être tracée. Added since 0.10.0

Fonctions

Tracé

love.graphics.arc Draws an arc. Added since 0.8.0
love.graphics.circle Draws a circle.
love.graphics.clear Clears the screen or active Canvas to the specified color.
love.graphics.discard Discards the contents of the screen or active Canvas. Added since 0.10.0
love.graphics.draw Draws objects on screen.
love.graphics.drawInstanced Draws many instances of a Mesh with a single draw call, using hardware geometry instancing. Added since 11.0
love.graphics.drawLayer Draws a layer of an Array Texture. Added since 11.0
love.graphics.drawq Draw a Quad with the specified Image on screen. Removed in 0.9.0
love.graphics.ellipse Draws an ellipse. Added since 0.10.0
love.graphics.flushBatch Immediately renders any pending automatically batched draws. Added since 11.0
love.graphics.line Draws lines between points.
love.graphics.point Draws a point. Added since 0.3.0 Removed in 0.10.0
love.graphics.points Draws one or more points. Added since 0.10.0
love.graphics.polygon Draw a polygon. Added since 0.4.0
love.graphics.present Displays the results of drawing operations on the screen.
love.graphics.print Draws text on screen. If no Font is set, one will be created and set (once) if needed.
love.graphics.printf Draws formatted text, with word wrap and alignment.
love.graphics.quad Draws a quadrilateral shape. Removed in 0.9.0
love.graphics.rectangle Draws a rectangle. Added since 0.3.2
love.graphics.stencil Draws geometry as a stencil. Added since 0.10.0
love.graphics.triangle Draws a triangle. Removed in 0.9.0

Création d'objets

love.graphics.captureScreenshot Creates a screenshot once the current frame is done. Added since 11.0
love.graphics.newArrayImage Creates a new array Image. Added since 11.0
love.graphics.newCanvas Creates a new Canvas. Added since 0.8.0
love.graphics.newCubeImage Creates a new cubemap Image. Added since 11.0
love.graphics.newFont Creates a new Font from a TrueType Font or BMFont file.
love.graphics.newFramebuffer Creates a new Framebuffer. Added since 0.7.0 Removed in 0.8.0
love.graphics.newImage Creates a new Image.
love.graphics.newImageFont Creates a new Font by loading a specifically formatted image. Added since 0.2.0
love.graphics.newMesh Creates a new Mesh. Added since 0.9.0
love.graphics.newParticleSystem Creates a new ParticleSystem.
love.graphics.newPixelEffect Creates a new PixelEffect. Added since 0.8.0 Removed in 0.9.0
love.graphics.newQuad Creates a new Quad.
love.graphics.newScreenshot Creates a screenshot and returns the ImageData. Removed in 11.0
love.graphics.newShader Creates a new Shader. Added since 0.9.0
love.graphics.newSpriteBatch Creates a new SpriteBatch.
love.graphics.newStencil Creates a new stencil. Added since 0.8.0 Removed in 0.9.0
love.graphics.newText Creates a new drawable Text object. Added since 0.10.0
love.graphics.newVideo Creates a new Video. Added since 0.10.0
love.graphics.newVolumeImage Creates a new volume Image. Added since 11.0
love.graphics.setNewFont Creates and sets a new Font. Added since 0.8.0
love.graphics.validateShader Validates shader code. Added since 11.0

Manipulations de graphismes

love.graphics.getBackgroundColor Gets the current background color.
love.graphics.getBlendMode Gets the blending mode. Added since 0.2.0
love.graphics.getCanvas Returns the current target Canvas. Added since 0.8.0
love.graphics.getColor Gets the current color.
love.graphics.getColorMask Gets the active color components used when drawing. Added since 0.9.0
love.graphics.getColorMode Gets the color mode (which controls how images are affected by the current color). Added since 0.2.0 Removed in 0.9.0
love.graphics.getDefaultFilter Returns the default scaling filters used with Images, Canvases, and Fonts. Added since 0.9.0
love.graphics.getDefaultImageFilter Returns the default scaling filters. Added since 0.8.0 Removed in 0.9.0
love.graphics.getDepthMode Gets the current depth test mode and whether writing to the depth buffer is enabled. Added since 11.0
love.graphics.getFont Gets the current Font object. Added since 0.9.0
love.graphics.getFrontFaceWinding Gets whether triangles with clockwise- or counterclockwise-ordered vertices are considered front-facing. Added since 11.0
love.graphics.getLineJoin Gets the line join style.
love.graphics.getLineStipple Gets the current line stipple. Removed in 0.8.0
love.graphics.getLineStyle Gets the line style. Added since 0.3.2
love.graphics.getLineWidth Gets the current line width. Added since 0.3.2
love.graphics.getMeshCullMode Gets whether back-facing triangles in a Mesh are culled. Added since 11.0
love.graphics.getPixelEffect Returns the current PixelEffect. Added since 0.8.0 Removed in 0.9.0
love.graphics.getPointSize Gets the point size.
love.graphics.getPointStyle Gets the current point style. Removed in 0.10.0
love.graphics.getScissor Gets the current scissor box. Added since 0.4.0
love.graphics.getShader Gets the current Shader. Added since 0.9.0
love.graphics.getStackDepth Gets the current depth of the transform / state stack (the number of pushes without corresponding pops). Added since 11.0
love.graphics.getStencilTest Gets the current stencil test configuration. Added since 0.10.0
love.graphics.intersectScissor Sets the scissor to the rectangle created by the intersection of the specified rectangle with the existing scissor. Added since 0.10.0
love.graphics.isActive Gets whether the graphics module is able to be used. Added since 0.10.0
love.graphics.isGammaCorrect Gets whether gamma-correct rendering is enabled. Added since 0.10.0
love.graphics.isSupported Checks for the support of graphics related functions. Added since 0.8.0 Removed in 0.10.0
love.graphics.isWireframe Gets whether wireframe mode is used when drawing. Added since 0.9.1
love.graphics.reset Resets the current graphics settings.
love.graphics.setBackgroundColor Sets the background color.
love.graphics.setBlendMode Sets the blending mode. Added since 0.2.0
love.graphics.setCanvas Captures drawing operations to a Canvas Added since 0.8.0
love.graphics.setColor Sets the color used for drawing.
love.graphics.setColorMask Sets the color mask. Enables or disables specific color components when rendering. Added since 0.9.0
love.graphics.setColorMode Sets the color mode (which controls how images are affected by the current color). Added since 0.2.0 Removed in 0.9.0
love.graphics.setDefaultFilter Sets the default scaling filters used with Images, Canvases, and Fonts. Added since 0.9.0
love.graphics.setDefaultImageFilter Sets the default scaling filters. Added since 0.8.0 Removed in 0.9.0
love.graphics.setDepthMode Configures depth testing and writing to the depth buffer. Added since 11.0
love.graphics.setFont Set an already-loaded Font as the current font.
love.graphics.setFrontFaceWinding Sets whether triangles with clockwise- or counterclockwise-ordered vertices are considered front-facing. Added since 11.0
love.graphics.setInvertedStencil Defines an inverted stencil. Added since 0.8.0 Removed in 0.10.0
love.graphics.setLine Sets the line width and style. Removed in 0.9.0
love.graphics.setLineJoin Sets the line join style.
love.graphics.setLineStipple Sets the line stipple pattern. Removed in 0.8.0
love.graphics.setLineStyle Sets the line style. Added since 0.3.2
love.graphics.setLineWidth Sets the line width. Added since 0.3.2
love.graphics.setMeshCullMode Sets whether back-facing triangles in a Mesh are culled. Added since 11.0
love.graphics.setPixelEffect Routes drawing operations through a pixel shader. Added since 0.8.0 Removed in 0.9.0
love.graphics.setPoint Sets the point size and style. Removed in 0.9.0
love.graphics.setPointSize Sets the point size.
love.graphics.setPointStyle Sets the point style. Removed in 0.10.0
love.graphics.setRenderTarget Captures drawing operations to a Framebuffer Added since 0.7.0 Removed in 0.8.0
love.graphics.setScissor Sets or disables scissor. Added since 0.4.0
love.graphics.setShader Routes drawing operations through a shader. Added since 0.9.0
love.graphics.setStencil Defines or releases a stencil. Added since 0.8.0 Removed in 0.10.0
love.graphics.setStencilTest Configures or disables stencil testing. Added since 0.10.0
love.graphics.setWireframe Sets whether wireframe lines will be used when drawing. Added since 0.9.1

Système de coordonnées

love.graphics.applyTransform Applies the given Transform object to the current coordinate transformation. Added since 11.0
love.graphics.inverseTransformPoint Converts the given 2D position from screen-space into global coordinates. Added since 11.0
love.graphics.origin Resets the current coordinate transformation. Added since 0.9.0
love.graphics.pop Pops the current coordinate transformation from the transformation stack.
love.graphics.push Copies and pushes the current coordinate transformation to the transformation stack.
love.graphics.replaceTransform Replaces the current coordinate transformation with the given Transform object. Added since 11.0
love.graphics.rotate Rotates the coordinate system in two dimensions.
love.graphics.scale Scales the coordinate system in two dimensions.
love.graphics.shear Shears the coordinate system. Added since 0.8.0
love.graphics.transformPoint Converts the given 2D position from global coordinates into screen-space. Added since 11.0
love.graphics.translate Translates the coordinate system in two dimensions.

Fenêtre

love.graphics.getDPIScale (Français) Récupère le facteur d'échelle PPP de la fenêtre.
love.graphics.getPixelDimensions (Français) Récupère la largeur et hauteur de la fenêtre, en pixels.
love.graphics.getPixelHeight (Français) Récupère la hauteur de la fenêtre en pixels.
love.graphics.getPixelWidth (Français) Gets the width in pixels of the window.

Enumérations

AlignMode (Français) Alignement du texte.
ArcType (Français) Différents types d'arcs pouvant être tracés. Added since 0.10.1
BlendAlphaMode (Français) Les différentes façons dont le canal alpha affecte les mélanges de couleurs. Added since 0.10.0
BlendMode (Français) Différentes méthodes de mixage de couleurs. Added since 0.2.0
CanvasFormat (Français) Canvas texture formats. Added since 0.9.0
ColorMode (Français) Contrôle la façon dont les images seront affectées par la couleur actuelle. Added since 0.2.0 Removed in 0.9.0
CompareMode (Français) Différents types de test de stencil par pixel et comparaisons de test de profondeur. Added since 0.10.0
CullMode (Français) Façon dont la géométrie des Mesh (maillages) est filtrée lors du rendu. Added since 11.0
DrawMode (Français) Contrôle si les formes sont tracées par leur bordure ou remplies.
FilterMode (Français) Façon dont l'image est filtrée lors d'un changement d'échelle.
GraphicsFeature (Français) Fonctionnalités graphiques pouvant être vérifiées à l'aide de love.graphics.getSupported. Added since 0.8.0
GraphicsLimit (Français) Types de limites graphique, dépendantes du système. Added since 0.9.1
IndexDataType (Français) Type de donnée des cartes de vecteur. Added since 11.0
LineJoin (Français) Style des jointures de ligne.
LineStyle (Français) Les styles dans lesquels les lignes sont tracées.
MeshDrawMode (Français) Façon dont les vecteurs d'un Mesh (maillage) sont tracés. Added since 0.9.0
MipmapMode (Français) Contrôle si un Canvas comporte des mipmaps, et sans comportement dans ce cas. Added since 11.0
PixelFormat (Français) Formats de pixels pour Textures, ImageData, et CompressedImageData. Added since 11.0
SpriteBatchUsage (Français) Indication d'usage pour les macros de sprite et maillages. Added since 0.8.0
StackType (Français) Types de piles d'état graphique utilisées avec love.graphics.push. Added since 0.9.2
StencilAction (Français) La façon dont la fonction stencil modifie les valeurs de stencil des pixels qu'il touche. Added since 0.10.0
TextureType (Français) Types de textures (2D, cubemap, etc.) Added since 11.0
VertexAttributeStep (Français) Fréquence à laquelle un ombrage de vecteur récupère les données des attributs de vecteurs depuis le maillage, lorsqu'il est tracé. Added since 11.0
VertexWinding (Français) Vertex winding. Added since 11.0
WrapMode (Français) La façon dont une image boucle l'intérieur d'un large Quad.


Voir aussi

Autres langues