mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Canvases can now be used in SpriteBatches, ParticleSystems, and Meshes (resolves issue #782).
Canvases and Images are now subclasses of the new Texture class. Added setTexture and getTexture methods for Meshes, ParticleSystems, and SpriteBatches (the old set/getImage methods are deprecated but not removed.) Canvas texture coordinates are no longer flipped.
This commit is contained in:
@@ -203,11 +203,11 @@ public:
|
||||
/**
|
||||
* Creates a Font object.
|
||||
**/
|
||||
Font *newFont(love::font::Rasterizer *data, const Image::Filter &filter = Image::Filter());
|
||||
Font *newFont(love::font::Rasterizer *data, const Texture::Filter &filter = Texture::getDefaultFilter());
|
||||
|
||||
SpriteBatch *newSpriteBatch(Image *image, int size, int usage);
|
||||
SpriteBatch *newSpriteBatch(Texture *texture, int size, int usage);
|
||||
|
||||
ParticleSystem *newParticleSystem(Image *image, int size);
|
||||
ParticleSystem *newParticleSystem(Texture *texture, int size);
|
||||
|
||||
Canvas *newCanvas(int width, int height, Canvas::TextureType texture_type = Canvas::TYPE_NORMAL);
|
||||
|
||||
@@ -270,18 +270,18 @@ public:
|
||||
/**
|
||||
* Sets the default filter for images, canvases, and fonts.
|
||||
**/
|
||||
void setDefaultFilter(const Image::Filter &f);
|
||||
void setDefaultFilter(const Texture::Filter &f);
|
||||
|
||||
/**
|
||||
* Gets the default filter for images, canvases, and fonts.
|
||||
**/
|
||||
const Image::Filter &getDefaultFilter() const;
|
||||
const Texture::Filter &getDefaultFilter() const;
|
||||
|
||||
/**
|
||||
* Default Image mipmap filter mode and sharpness values.
|
||||
**/
|
||||
void setDefaultMipmapFilter(Image::FilterMode filter, float sharpness);
|
||||
void getDefaultMipmapFilter(Image::FilterMode *filter, float *sharpness) const;
|
||||
void setDefaultMipmapFilter(Texture::FilterMode filter, float sharpness);
|
||||
void getDefaultMipmapFilter(Texture::FilterMode *filter, float *sharpness) const;
|
||||
|
||||
/**
|
||||
* Sets the line width.
|
||||
|
||||
Reference in New Issue
Block a user