Free Electron
ImageIL.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 __openil_ImageIL_h__
8 #define __openil_ImageIL_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Image handling using OpenIL aka DevIL
17 
18  @ingroup openil
19 
20  http://openil.sourceforge.net
21 *//***************************************************************************/
22 class FE_DL_EXPORT ImageIL: public ImageCommon
23 {
24  public:
25  ImageIL(void);
26 virtual ~ImageIL(void);
27 
28  //* As ImageI
29 virtual I32 createSelect(void);
30 virtual I32 loadSelect(String filename);
31 virtual I32 interpretSelect(void* data,U32 size);
32 virtual I32 interpretSelect(String a_source);
33 
34 virtual BWORD save(String filename);
35 virtual void select(I32 id);
36 virtual I32 selected(void) const { return m_selected; }
37 virtual void unload(I32 id);
38 
39 virtual void setFormat(ImageI::Format format);
40 virtual ImageI::Format format(void) const;
41 
42 virtual void resize(U32 width,U32 height,U32 depth);
43 virtual void replaceRegion(U32 x,U32 y,U32 z,
44  U32 width,U32 height,U32 depth,void* data);
45 
46 virtual U32 width(void) const;
47 virtual U32 height(void) const;
48 virtual U32 depth(void) const;
49 virtual void* raw(void) const;
50 
51 virtual U32 regionCount(void) const { return 0; }
52 virtual String regionName(U32 a_regionIndex) const { return ""; }
53 virtual Box2i regionBox(String a_regionName) const
54  { return Box2i(Vector2i(0,0),Vector2i(0,0)); }
55 virtual String pickRegion(I32 a_x,I32 a_y) const { return ""; }
56 
57  private:
58  ILenum formatID(void) const;
59  ILenum typeID(ILuint formatid) const;
60  ILubyte bppID(ILuint formatid) const;
61 
62  I32 m_selected;
63 };
64 
65 } /* namespace ext */
66 } /* namespace fe */
67 
68 #endif /* __openil_ImageIL_h__ */
kernel
Definition: namespace.dox:3
Image handling using OpenIL aka DevIL.
Definition: ImageIL.h:22
virtual I32 selected(void) const
return the selected image ID
Definition: ImageIL.h:36
General functionality for image support.
Definition: ImageCommon.h:20
Automatically reference-counted string container.
Definition: String.h:128