summaryrefslogtreecommitdiffhomepage
path: root/nGenEx/ImgView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'nGenEx/ImgView.cpp')
-rw-r--r--nGenEx/ImgView.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/nGenEx/ImgView.cpp b/nGenEx/ImgView.cpp
index 7cfce10..613667c 100644
--- a/nGenEx/ImgView.cpp
+++ b/nGenEx/ImgView.cpp
@@ -1,15 +1,15 @@
/* Project nGenEx
- Destroyer Studios LLC
- Copyright © 1997-2004. All Rights Reserved.
+ Destroyer Studios LLC
+ Copyright © 1997-2004. All Rights Reserved.
- SUBSYSTEM: nGenEx.lib
- FILE: ImgView.cpp
- AUTHOR: John DiCamillo
+ SUBSYSTEM: nGenEx.lib
+ FILE: ImgView.cpp
+ AUTHOR: John DiCamillo
- OVERVIEW
- ========
- Bitmap "billboard" Image View class
+ OVERVIEW
+ ========
+ Bitmap "billboard" Image View class
*/
#include "MemDebug.h"
@@ -23,19 +23,19 @@
// +--------------------------------------------------------------------+
ImgView::ImgView(Window* c, Bitmap* bmp)
- : View(c), img(bmp), width(0), height(0), x_offset(0), y_offset(0),
- blend(Video::BLEND_SOLID)
+: View(c), img(bmp), width(0), height(0), x_offset(0), y_offset(0),
+blend(Video::BLEND_SOLID)
{
- if (img) {
- width = img->Width();
- height = img->Height();
- }
+ if (img) {
+ width = img->Width();
+ height = img->Height();
+ }
- if (width < c->Width())
- x_offset = (c->Width() - width) / 2;
+ if (width < c->Width())
+ x_offset = (c->Width() - width) / 2;
- if (height < c->Height())
- y_offset = (c->Height() - height) / 2;
+ if (height < c->Height())
+ y_offset = (c->Height() - height) / 2;
}
ImgView::~ImgView()
@@ -47,13 +47,13 @@ ImgView::~ImgView()
void
ImgView::Refresh()
{
- if (img && width > 0 && height > 0)
- window->DrawBitmap(x_offset,
- y_offset,
- x_offset + width,
- y_offset + height,
- img,
- blend);
+ if (img && width > 0 && height > 0)
+ window->DrawBitmap(x_offset,
+ y_offset,
+ x_offset + width,
+ y_offset + height,
+ img,
+ blend);
}
// +--------------------------------------------------------------------+
@@ -61,19 +61,19 @@ ImgView::Refresh()
void
ImgView::SetPicture(Bitmap* bmp)
{
- img = bmp;
- width = 0;
- height = 0;
- x_offset = 0;
- y_offset = 0;
+ img = bmp;
+ width = 0;
+ height = 0;
+ x_offset = 0;
+ y_offset = 0;
- if (img) {
- width = img->Width();
- height = img->Height();
- }
+ if (img) {
+ width = img->Width();
+ height = img->Height();
+ }
- if (window) {
- x_offset = (window->Width() - width) / 2;
- y_offset = (window->Height() - height) / 2;
- }
+ if (window) {
+ x_offset = (window->Width() - width) / 2;
+ y_offset = (window->Height() - height) / 2;
+ }
}