Free Electron
ImageCommon.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __image_ImageCommon_h__
8 #define __image_ImageCommon_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief General functionality for image support
17 
18  @ingroup image
19 *//***************************************************************************/
20 class FE_DL_EXPORT ImageCommon: virtual public ImageI
21 {
22  public:
23  ImageCommon(void);
24 virtual ~ImageCommon(void);
25 
26  //* As ImageI
27 virtual I32 createSelect(void) { return -1; }
28 virtual I32 loadSelect(String filename) { return -1; }
29 virtual I32 interpretSelect(void* data,U32 size) { return -1; }
30 virtual I32 interpretSelect(String a_source) { return -1; }
31 
32 virtual I32 serial(void) const;
33 
34 virtual BWORD save(String filename) { return FALSE; }
35 
36 virtual U32 regionCount(void) const { return 0; }
37 virtual String regionName(U32 a_regionIndex) const { return ""; }
38 virtual Box2i regionBox(String a_regionName) const
39  { return Box2i(Vector2i(0,0),Vector2i(0,0)); }
40 virtual String pickRegion(I32 a_x,I32 a_y) const { return ""; }
41 
42  protected:
43 
44  void incrementSerial(void);
45 
46  private:
47 
48  Array<I32> m_serialArray;
49 };
50 
51 } /* namespace ext */
52 } /* namespace fe */
53 
54 #endif /* __image_ImageCommon_h__ */
Image and texture handling.
Definition: ImageI.h:26
kernel
Definition: namespace.dox:3
virtual I32 loadSelect(String filename)
load an image from file, returning its ID
Definition: ImageCommon.h:28
virtual I32 interpretSelect(void *data, U32 size)
create an image from raw bytes, returning its ID
Definition: ImageCommon.h:29
General functionality for image support.
Definition: ImageCommon.h:20
virtual BWORD save(String filename)
save the selected image to file
Definition: ImageCommon.h:34
Automatically reference-counted string container.
Definition: String.h:128
virtual I32 interpretSelect(String a_source)
create an image from text, returning its ID
Definition: ImageCommon.h:30
virtual I32 createSelect(void)
create an empty image, returning its ID
Definition: ImageCommon.h:27