aboutsummaryrefslogtreecommitdiff
path: root/graphics/surface.h
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/surface.h')
-rw-r--r--graphics/surface.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics/surface.h b/graphics/surface.h
index 9d91a601e4..9c8c040cbf 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.