From 8898ad9b25fca6afe2374d293a981db02a83d7e9 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 31 May 2012 14:46:27 +0000 Subject: Committing the documentation to svn to have it accessible online --- Doc/doxygen/html/_img_view_8cpp_source.html | 196 ++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 Doc/doxygen/html/_img_view_8cpp_source.html (limited to 'Doc/doxygen/html/_img_view_8cpp_source.html') diff --git a/Doc/doxygen/html/_img_view_8cpp_source.html b/Doc/doxygen/html/_img_view_8cpp_source.html new file mode 100644 index 0000000..759cf0e --- /dev/null +++ b/Doc/doxygen/html/_img_view_8cpp_source.html @@ -0,0 +1,196 @@ + + + + + +Starshatter_Open: D:/SRC/StarshatterSVN/nGenEx/ImgView.cpp Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Starshatter_Open +
+
Open source Starshatter engine
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
ImgView.cpp
+
+
+Go to the documentation of this file.
1 /* Project nGenEx
+
2  Destroyer Studios LLC
+
3  Copyright © 1997-2004. All Rights Reserved.
+
4 
+
5  SUBSYSTEM: nGenEx.lib
+
6  FILE: ImgView.cpp
+
7  AUTHOR: John DiCamillo
+
8 
+
9 
+
10  OVERVIEW
+
11  ========
+
12  Bitmap "billboard" Image View class
+
13 */
+
14 
+
15 #include "MemDebug.h"
+
16 #include "ImgView.h"
+
17 #include "Color.h"
+
18 #include "Window.h"
+
19 #include "Video.h"
+
20 #include "Bitmap.h"
+
21 #include "Screen.h"
+
22 
+
23 // +--------------------------------------------------------------------+
+
24 
+ +
26 : View(c), img(bmp), width(0), height(0), x_offset(0), y_offset(0),
+
27 blend(Video::BLEND_SOLID)
+
28 {
+
29  if (img) {
+
30  width = img->Width();
+
31  height = img->Height();
+
32  }
+
33 
+
34  if (width < c->Width())
+
35  x_offset = (c->Width() - width) / 2;
+
36 
+
37  if (height < c->Height())
+
38  y_offset = (c->Height() - height) / 2;
+
39 }
+
40 
+ +
42 {
+
43 }
+
44 
+
45 // +--------------------------------------------------------------------+
+
46 
+
47 void
+ +
49 {
+
50  if (img && width > 0 && height > 0)
+ +
52  y_offset,
+
53  x_offset + width,
+
54  y_offset + height,
+
55  img,
+
56  blend);
+
57 }
+
58 
+
59 // +--------------------------------------------------------------------+
+
60 
+
61 void
+ +
63 {
+
64  img = bmp;
+
65  width = 0;
+
66  height = 0;
+
67  x_offset = 0;
+
68  y_offset = 0;
+
69 
+
70  if (img) {
+
71  width = img->Width();
+
72  height = img->Height();
+
73  }
+
74 
+
75  if (window) {
+
76  x_offset = (window->Width() - width) / 2;
+
77  y_offset = (window->Height() - height) / 2;
+
78  }
+
79 }
+
+
+ + + + -- cgit v1.1