Skip to content

Mojo graphics image new

mojo:mojo.graphics.Image.New

Method New:Void( pixmap:std.graphics.Pixmap,textureFlags:TextureFlags=TextureFlags.FilterMipmap,shader:Shader=Null )#
Method New:Void( texture:Texture,rect:std.geom.Recti,shader:Shader=Null )#
Method New:Void( texture:Texture,shader:Shader=Null )#
Method New:Void( atlas:Image,x:Int,y:Int,width:Int,height:Int )#
Method New:Void( atlas:Image,rect:std.geom.Recti )#
Method New:Void( width:Int,height:Int,format:std.graphics.PixelFormat,textureFlags:TextureFlags=TextureFlags.FilterMipmap,shader:Shader=Null )#
Method New:Void( width:Int,height:Int,textureFlags:TextureFlags=TextureFlags.FilterMipmap,shader:Shader=Null )#

Creates a new Image.

New( pixmap,... ) Creates an image from an existing pixmap.

New( texture,... ) Creates an image from an existing texture.

New( atlas,... ) Creates an image 'frame' from an 'atlas' image. The new images shares the same material as the atlas.

New( width,height,... ) Creates an image that can be rendered to using a canvas.

Parameters
pixmap pixmap Source image.
texture texture Source texture.
textureFlags textureFlags Image texture flags.
shader shader Image shader.
atlas atlas Source atlas image.
rect rect Source rect.
x,y,width,height x,y,width,height Source rect
width,height width,height Image size.