aboutsummaryrefslogtreecommitdiff
path: root/graphics/surface.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-10-27 19:20:28 -0400
committerMatthew Hoops2011-10-27 19:20:28 -0400
commitc2af197edb7719ca4d4ad77d778c135db6149ba4 (patch)
treedd25b339fb877ad6c7fced735d25296f7eec68b7 /graphics/surface.cpp
parent627684ca73833117425f3fd9d2257efb2157cb3c (diff)
downloadscummvm-rg350-c2af197edb7719ca4d4ad77d778c135db6149ba4.tar.gz
scummvm-rg350-c2af197edb7719ca4d4ad77d778c135db6149ba4.tar.bz2
scummvm-rg350-c2af197edb7719ca4d4ad77d778c135db6149ba4.zip
GRAPHICS: Add a Surface wrapper for drawThickLine
Diffstat (limited to 'graphics/surface.cpp')
-rw-r--r--graphics/surface.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics/surface.cpp b/graphics/surface.cpp
index e0b25f22e9..c1c676ed0b 100644
--- a/graphics/surface.cpp
+++ b/graphics/surface.cpp
@@ -48,6 +48,17 @@ void Surface::drawLine(int x0, int y0, int x1, int y1, uint32 color) {
error("Surface::drawLine: bytesPerPixel must be 1, 2, or 4");
}
+void Surface::drawThickLine(int x0, int y0, int x1, int y1, int penX, int penY, uint32 color) {
+ if (format.bytesPerPixel == 1)
+ Graphics::drawThickLine(x0, y0, x1, y1, penX, penY, color, plotPoint<byte>, this);
+ else if (format.bytesPerPixel == 2)
+ Graphics::drawThickLine(x0, y0, x1, y1, penX, penY, color, plotPoint<uint16>, this);
+ else if (format.bytesPerPixel == 4)
+ Graphics::drawThickLine(x0, y0, x1, y1, penX, penY, color, plotPoint<uint32>, this);
+ else
+ error("Surface::drawThickLine: bytesPerPixel must be 1, 2, or 4");
+}
+
void Surface::create(uint16 width, uint16 height, const PixelFormat &f) {
free();