GUIDOLib  1.7.7
Guido Engine Internal Documentation
Bitmap.h
1 #ifndef Bitmap_H
2 #define Bitmap_H
3 
4 /*
5  GUIDO Library
6  Copyright (C) 2002 Holger Hoos, Juergen Kilian, Kai Renz
7  Copyright (C) 2003 Grame
8 
9  This Source Code Form is subject to the terms of the Mozilla Public
10  License, v. 2.0. If a copy of the MPL was not distributed with this
11  file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 
13  Grame Research Laboratory, 11, cours de Verdun Gensoul 69002 Lyon - France
14  research@grame.fr
15 
16 */
17 
18 #include "Image.h"
19 #include "VGDevice.h"
20 
24 class Bitmap : public Image
25 {
26  private:
27  VGDevice * fDevice;
28 
29  public:
30  Bitmap( const char * inName );
31  virtual ~Bitmap();
32 
33  virtual void OnDraw( VGDevice & hdc, const NVRect & where ) const;
34  virtual void OnDrawW( VGDevice & hdc, const NVPoint & where, float width ) const;
35  virtual void OnDrawH( VGDevice & hdc, const NVPoint & where, float height ) const;
36 
37  virtual float GetProportionalHeight( float width ) const;
38  virtual float GetProportionalWidth( float height ) const;
39 
40  virtual int GetWidth() const { return fDevice ? fDevice->GetWidth() : 0; }
41  virtual int GetHeight() const { return fDevice ? fDevice->GetHeight() : 0; }
42 
43  const VGDevice *getDevice() const { return fDevice; }
44 
45  const bool getIsSVGDevice() const { return isSVGDevice; }
46 
47  protected:
49 };
50 
51 #endif
52 
53 
Bitmap::~Bitmap
virtual ~Bitmap()
VGDevice::GetWidth
virtual int GetWidth() const =0
Returns the width (set via NotifySize) of the current VGDevice.
Bitmap
a Bitmap image that can be drawn on the score. (not fully implemented yet)
Definition: Bitmap.h:24
Image
Definition: Image.h:23
NVPoint
Definition: NVPoint.h:20
Bitmap::GetWidth
virtual int GetWidth() const
Definition: Bitmap.h:40
Bitmap::GetProportionalWidth
virtual float GetProportionalWidth(float height) const
VGDevice::GetHeight
virtual int GetHeight() const =0
Returns the height (set via NotifySize) of the current VGDevice.
Bitmap::getIsSVGDevice
const bool getIsSVGDevice() const
Definition: Bitmap.h:45
VGDevice
Generic platform independant drawing device.
Definition: VGDevice.h:68
Bitmap::Bitmap
Bitmap(const char *inName)
Bitmap::OnDrawH
virtual void OnDrawH(VGDevice &hdc, const NVPoint &where, float height) const
NVRect
Definition: NVRect.h:22
Bitmap::OnDraw
virtual void OnDraw(VGDevice &hdc, const NVRect &where) const
Bitmap::GetHeight
virtual int GetHeight() const
Definition: Bitmap.h:41
Bitmap::isSVGDevice
bool isSVGDevice
Definition: Bitmap.h:48
Bitmap::GetProportionalHeight
virtual float GetProportionalHeight(float width) const
Bitmap::getDevice
const VGDevice * getDevice() const
Definition: Bitmap.h:43
Bitmap::OnDrawW
virtual void OnDrawW(VGDevice &hdc, const NVPoint &where, float width) const

Guido Project Copyright © 2019 Grame-CNCM