aboutsummaryrefslogtreecommitdiff
path: root/graphics/surface.h
diff options
context:
space:
mode:
authorMatthew Hoops2011-06-30 08:12:39 -0400
committerJohannes Schickel2012-03-20 01:06:47 +0100
commita004897252fba00d48a6acb0dc5298897faefdfb (patch)
tree2e4072cac6463af6d96c16d94233ff9db597899c /graphics/surface.h
parent9997493e36ff4a391b485d3794f04e5e1c3cf53f (diff)
downloadscummvm-rg350-a004897252fba00d48a6acb0dc5298897faefdfb.tar.gz
scummvm-rg350-a004897252fba00d48a6acb0dc5298897faefdfb.tar.bz2
scummvm-rg350-a004897252fba00d48a6acb0dc5298897faefdfb.zip
GRAPHICS: Add a convertTo() function to Surface
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 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.