From bcd99fe009fb7d8b14ca4a711befa7f156b29ae7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 6 May 2012 01:17:00 +0300 Subject: Add const to images in drawing functions. --- src/graphics.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/graphics.cpp') diff --git a/src/graphics.cpp b/src/graphics.cpp index f72e495c6..193d3b271 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -351,7 +351,7 @@ int Graphics::getHeight() const return mHeight; } -bool Graphics::drawImage(Image *image, int x, int y) +bool Graphics::drawImage(const Image *image, int x, int y) { if (image) { @@ -408,7 +408,7 @@ bool Graphics::drawRescaledImage(Image *image, int srcX, int srcY, return returnValue; } -bool Graphics::drawImage(Image *image, int srcX, int srcY, int dstX, int dstY, +bool Graphics::drawImage(const Image *image, int srcX, int srcY, int dstX, int dstY, int width, int height, bool) { // Check that preconditions for blitting are met. @@ -442,7 +442,7 @@ bool Graphics::drawImage(Image *image, int srcX, int srcY, int dstX, int dstY, } } -void Graphics::drawImagePattern(Image *image, int x, int y, int w, int h) +void Graphics::drawImagePattern(const Image *image, int x, int y, int w, int h) { // Check that preconditions for blitting are met. if (!mTarget || !image) @@ -639,7 +639,7 @@ void Graphics::drawImageRect2(GraphicsVertexes* vert, const ImageRect &imgRect) } } -void Graphics::drawImagePattern2(GraphicsVertexes *vert, Image *img) +void Graphics::drawImagePattern2(GraphicsVertexes *vert, const Image *img) { // here not checking input parameters -- cgit v1.2.3-60-g2f50