aboutsummaryrefslogtreecommitdiff
path: root/src/lua/graphics
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-08-15 18:27:30 +0800
committerchai <chaifix@163.com>2018-08-15 18:27:30 +0800
commitbe9b27dbf550093b555ab3087c11b38c89ab9fd0 (patch)
treeddd96bb71b3ad3a32ae844a38bb95525bd0b0666 /src/lua/graphics
parentac9079ff1449e2638cbf7339edcc6e4b186e5eaa (diff)
*update
Diffstat (limited to 'src/lua/graphics')
-rw-r--r--src/lua/graphics/Canvas.h1
-rw-r--r--src/lua/graphics/Image.h12
-rw-r--r--src/lua/graphics/JSL.h2
3 files changed, 12 insertions, 3 deletions
diff --git a/src/lua/graphics/Canvas.h b/src/lua/graphics/Canvas.h
index d2c9287..4494db4 100644
--- a/src/lua/graphics/Canvas.h
+++ b/src/lua/graphics/Canvas.h
@@ -44,6 +44,7 @@ namespace graphics
static void unbind();
private:
+ Canvas() {}
~Canvas()
{
delete canvas;
diff --git a/src/lua/graphics/Image.h b/src/lua/graphics/Image.h
index d96f69d..0d1d010 100644
--- a/src/lua/graphics/Image.h
+++ b/src/lua/graphics/Image.h
@@ -20,19 +20,23 @@ namespace graphics
{
return image->getWidth();
}
+
int getHeight()
{
return image->getHeight();
}
- void setAnchor(int x, int y)
+
+ void setAnchor(int x, int y)
{
image->setAnchor(x, y);
}
- jin::graphics::color getPixel(int x, int y)
+
+ jin::graphics::color getPixel(int x, int y)
{
return image->getPixel(x, y);
}
- inline const jin::graphics::Texture* getRawImage() const
+
+ inline const jin::graphics::Texture* getRawImage() const
{
return image;
}
@@ -43,6 +47,8 @@ namespace graphics
}
private:
+ Image() {};
+
~Image()
{
delete image;
diff --git a/src/lua/graphics/JSL.h b/src/lua/graphics/JSL.h
index 62aa638..af6c54d 100644
--- a/src/lua/graphics/JSL.h
+++ b/src/lua/graphics/JSL.h
@@ -74,6 +74,8 @@ namespace graphics
static JSLProgram* currentJSLProgram;
+ JSLProgram() {}
+
~JSLProgram()
{
delete jslprogram;