HoverRace  2.0
Bitmap.h
Go to the documentation of this file.
1 // Bitmap.h
2 //
3 //
4 // Copyright (c) 1995-1998 - Richard Langlois and Grokksoft Inc.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 //
22 
23 #pragma once
24 
25 #include "../Util/MR_Types.h"
26 
27 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
28 # ifdef MR_ENGINE
29 # define MR_DllDeclare __declspec( dllexport )
30 # else
31 # define MR_DllDeclare __declspec( dllimport )
32 # endif
33 #else
34 # define MR_DllDeclare
35 #endif
36 
37 namespace HoverRace {
38 namespace VideoServices {
39 
41 {
42  // Very flexible but may have to be change for performance issue
43  public:
44  virtual ~Bitmap() { }
45 
46  // Bitmap related functions
47  virtual int GetWidth() const = 0; // in mm
48  virtual int GetHeight() const = 0; // in mm
49  virtual int GetMaxXRes() const = 0;
50  virtual int GetMaxYRes() const = 0;
51  virtual MR_UInt8 GetPlainColor() const = 0;
52 
53  // Subbitmap related functions
54  virtual int GetNbSubBitmap() const = 0;
55  int GetBestBitmapFor(int pXRes, int pYRes) const;
56  int GetBestBitmapForYRes(int pYRes) const;
57  int GetBestBitmapForXRes(int pXRes) const;
58  int GetBestBitmapForPitch_4096(int pPitch_4096) const;
59 
60  virtual int GetXRes(int pSubBitmap) const = 0;
61  virtual int GetYRes(int pSubBitmap) const = 0;
62  virtual int GetXResShiftFactor(int pSubBitmap) const = 0;
63  virtual int GetYResShiftFactor(int pSubBitmap) const = 0;
64  virtual MR_UInt8 *GetBuffer(int pSubBitmap) const = 0;
65  virtual MR_UInt8 *GetColumnBuffer(int pSubBitmap, int pColumn) const = 0;
66  virtual MR_UInt8 **GetColumnBufferTable(int pSubBitmap) const = 0;
67 };
68 
69 } // namespace VideoServices
70 } // namespace HoverRace
71 
72 #undef MR_DllDeclare
#define MR_DllDeclare
Definition: Bitmap.h:34
virtual ~Bitmap()
Definition: Bitmap.h:44
Definition: Bitmap.h:40
Definition: Announcement.h:24
uint8_t MR_UInt8
Definition: MR_Types.h:40