Difference between revisions of "love.graphics"
m (1 revision: Imported docs from potato.) |
|||
Line 1: | Line 1: | ||
+ | The graphics module. | ||
+ | The graphics module is responsible for things like window management, Images, Animations, Fonts, and more. | ||
== Types == | == Types == | ||
{{#ask: [[Category:Types]] [[parent::love.graphics]] | {{#ask: [[Category:Types]] [[parent::love.graphics]] | ||
Line 17: | Line 19: | ||
}} | }} | ||
[[Category:Modules]] | [[Category:Modules]] | ||
− | {{#set:Description=}} | + | {{#set:Description=The graphics module. |
+ | }} | ||
== See Also == | == See Also == | ||
* [[parent::love]] | * [[parent::love]] |
Revision as of 16:17, 14 February 2010
The graphics module.
The graphics module is responsible for things like window management, Images, Animations, Fonts, and more.
Contents
Types
Canvas | Off-screen render target. |
Drawable | Superclass for all things that can be drawn on screen. |
Font | Defines the shape of characters than can be drawn onto the screen. |
Framebuffer | Off-screen render target. |
GraphicsBuffer | Low-level data stored in graphics memory, including arrays of vertices, vertex indices, and custom collections of data accessible in Shaders. |
Image | Drawable image type. |
Mesh | A 2D polygon mesh used for drawing arbitrary textured shapes. |
ParticleSystem | Used to create cool effects, like fire. |
PixelEffect | Pixel shader effect. |
Quad | A quadrilateral with texture coordinate information. |
Shader | Shader effect. |
SpriteBatch | Store image positions in a buffer, and draw it in one call. |
Text | Drawable text. |
TextBatch | One or more precalculated strings of text stored in a Drawable object. |
Texture | Superclass for drawable objects which represent a texture. |
Video | A drawable video. |
Functions
love.graphics.applyTransform | Applies the given Transform object to the current coordinate transformation. |
love.graphics.arc | Draws an arc. |
love.graphics.captureScreenshot | Creates a screenshot once the current frame is done. |
love.graphics.checkMode | Checks if a display mode is supported. |
love.graphics.circle | Draws a circle. |
love.graphics.clear | Clears the screen or active Canvas to the specified color. |
love.graphics.copyBuffer | Copies the contents of one GraphicsBuffer to another. |
love.graphics.discard | Discards the contents of the screen or active Canvas. |
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. |
love.graphics.drawLayer | Draws a layer of an Array Texture. |
love.graphics.drawq | Draw a Quad with the specified Image on screen. |
love.graphics.ellipse | Draws an ellipse. |
love.graphics.flushBatch | Immediately renders any pending automatically batched draws. |
love.graphics.getBackgroundColor | Gets the current background color. |
love.graphics.getBlendMode | Gets the blending mode. |
love.graphics.getCanvas | Returns the current target Canvas. |
love.graphics.getCanvasFormats | Gets the available Canvas formats, and whether each is supported. |
love.graphics.getCaption | Gets the window caption. |
love.graphics.getColor | Gets the current color. |
love.graphics.getColorMask | Gets the active color components used when drawing. |
love.graphics.getColorMode | Gets the color mode (which controls how images are affected by the current color). |
love.graphics.getCompressedImageFormats | Gets the available compressed image formats, and whether each is supported. |
love.graphics.getDPIScale | Gets the DPI scale factor of the window. |
love.graphics.getDefaultFilter | Returns the default scaling filters used with Images, Canvases, and Fonts. |
love.graphics.getDefaultImageFilter | Returns the default scaling filters. |
love.graphics.getDepthMode | Gets the current depth test mode and whether writing to the depth buffer is enabled. |
love.graphics.getDimensions | Gets the width and height of the window. |
love.graphics.getFont | Gets the current Font object. |
love.graphics.getFrontFaceWinding | Gets whether triangles with clockwise- or counterclockwise-ordered vertices are considered front-facing. |
love.graphics.getHeight | Gets the height in pixels of the window. |
love.graphics.getImageFormats | Gets the pixel formats usable for Images, and whether each is supported. |
love.graphics.getLineJoin | Gets the line join style. |
love.graphics.getLineStipple | Gets the current line stipple. |
love.graphics.getLineStyle | Gets the line style. |
love.graphics.getLineWidth | Gets the current line width. |
love.graphics.getMaxImageSize | Gets the max supported width or height of Images and Canvases. |
love.graphics.getMaxPointSize | Gets the max supported point size. |
love.graphics.getMeshCullMode | Gets whether back-facing triangles in a Mesh are culled. |
love.graphics.getMode | Returns the current display mode. |
love.graphics.getModes | Gets a list of supported fullscreen modes. |
love.graphics.getPixelDimensions | Gets the width and height in pixels of the window. |
love.graphics.getPixelEffect | Returns the current PixelEffect. |
love.graphics.getPixelHeight | Gets the height in pixels of the window. |
love.graphics.getPixelWidth | Gets the width in pixels of the window. |
love.graphics.getPointSize | Gets the point size. |
love.graphics.getPointStyle | Gets the current point style. |
love.graphics.getRendererInfo | Gets information about the system's video card and drivers. |
love.graphics.getScissor | Gets the current scissor box. |
love.graphics.getShader | Gets the current Shader. |
... further results |
Enums
AlignMode | Text alignment. |
ArcType | Different types of arcs that can be drawn. |
AttributeDataType | Data types used in a Mesh's vertex format. |
BlendAlphaMode | Different ways alpha affects color blending. |
BlendMode | Different ways to do color blending. |
BufferDataFormat | Data formats of individual array elements GraphicsBuffers and Meshes. |
BufferDataUsage | Usage hints for SpriteBatches, Meshes, and GraphicsBuffers to optimize data storage and access. |
CanvasFormat | Canvas texture formats. |
ColorMode | Controls how drawn images are affected by current color. |
CompareMode | Different types of stencil test and depth test comparisons. |
CullMode | How Mesh geometry is culled when rendering. |
DrawMode | Controls whether shapes are drawn as an outline, or filled. |
FilterMode | How the image is filtered when scaling. |
GraphicsFeature | Graphics features that can be checked for with love.graphics.getSupported. |
GraphicsLimit | Types of system-dependent graphics limits. |
ImageFlag | Image flags. |
IndexDataType | Vertex map datatype. |
LineJoin | Line join style. |
LineStyle | The styles in which lines are drawn. |
MeshDrawMode | How a Mesh's vertices are used when drawing. |
MipmapMode | Controls whether a Canvas has mipmaps, and its behaviour when it does. |
PixelFormat | Pixel formats for Textures, ImageData, and CompressedImageData. |
PointStyle | How points should be drawn. |
StackType | Graphics state stack types used with love.graphics.push. |
StencilAction | How a stencil function modifies the stencil values of pixels it touches. |
TextureFormat | Controls the canvas texture format. |
TextureType | Types of textures (2D, cubemap, etc.) |
VertexAttributeStep | The frequency at which a vertex shader fetches the vertex attribute's data from the Mesh when it's drawn. |
VertexWinding | Vertex winding. |
WrapMode | How the image wraps inside a large Quad. |