diff options
Diffstat (limited to 'graphics/surface.h')
-rw-r--r-- | graphics/surface.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics/surface.h b/graphics/surface.h index 018a283aad..eb8d1ac42e 100644 --- a/graphics/surface.h +++ b/graphics/surface.h @@ -135,6 +135,17 @@ struct Surface { void copyFrom(const Surface &surf); /** + * Convert the data to another pixel format. + * + * The calling code must call free on the returned surface and then delete + * it. + * + * @param dstFormat The desired format + * @param palette The palette (in RGB888), if the source format has a Bpp of 1 + */ + Graphics::Surface *convertTo(const PixelFormat &dstFormat, const byte *palette = 0) const; + + /** * Draw a line. * * @param x0 The x coordinate of the start point. |