CFx SDK Documentation  2023 SP0
GsBitMap.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 
25 
26 
27 #ifndef _OD_GSBITMAP_H_
28 #define _OD_GSBITMAP_H_
29 
30 #include "RxObject.h"
31 #include "Gs/Gs.h"
32 #include "OdStreamBuf.h"
33 #include "SmartPtr.h"
34 
35 
40 class OdGsPalette : public OdRxObject
41 {
42 public:
45 
46  virtual OdUInt32 numColors() const = 0;
47  virtual void setNumColors(OdUInt32 nColors) = 0;
48  virtual void setColorAt(OdUInt32 nIndex, OdUInt8 blue, OdUInt8 green, OdUInt8 red, OdUInt8 alpha = 0) = 0;
49  virtual void colorAt(OdUInt32 nIndex, OdUInt8& blue, OdUInt8& green, OdUInt8& red, OdUInt8* pAlpha = 0) const = 0;
50  virtual void setColors(OdUInt32 nColors, const ODCOLORREF* pColors);
51  virtual void getColors(OdUInt32 nColors, ODCOLORREF* pColors) const;
52 };
53 
55 
56 
61 class OdGsBitMap : public OdRxObject
62 {
63 protected:
65 public:
67 
68  virtual OdUInt32 width() const = 0;
69  virtual OdUInt32 height() const = 0;
70  virtual OdUInt8 bitPerPixel() const = 0;
71  virtual void create(OdUInt32 width, OdUInt32 height, OdUInt8 bitCount) = 0;
72 
73  virtual OdUInt32 bitDataSize() const;
74  virtual OdUInt32 bytePerLine() const;
75  virtual const OdUInt8* bits() const = 0;
76  virtual void setBits(const OdUInt8* pData, OdUInt32 nSize) = 0;
77 
78  virtual OdGsPalette* palette() = 0;
79  virtual const OdGsPalette* palette() const = 0;
80 };
81 
83 
84 #endif //_OD_GSBITMAP_H_
OdSmartPtr< OdGsBitMap > OdGsBitMapPtr
Definition: GsBitMap.h:82
OdSmartPtr< OdGsPalette > OdGsPalettePtr
Definition: GsBitMap.h:54
#define ODCOLORREF
Definition: OdPlatform.h:883
unsigned int OdUInt32
unsigned char OdUInt8
virtual OdUInt32 bitDataSize() const
virtual const OdUInt8 * bits() const =0
ODRX_DECLARE_MEMBERS(OdGsBitMap)
virtual void create(OdUInt32 width, OdUInt32 height, OdUInt8 bitCount)=0
OdGsBitMap()
Definition: GsBitMap.h:64
virtual void setBits(const OdUInt8 *pData, OdUInt32 nSize)=0
virtual const OdGsPalette * palette() const =0
virtual OdUInt8 bitPerPixel() const =0
virtual OdUInt32 width() const =0
virtual OdUInt32 height() const =0
virtual OdUInt32 bytePerLine() const
virtual OdGsPalette * palette()=0
ODRX_DECLARE_MEMBERS(OdGsPalette)
virtual OdUInt32 numColors() const =0
OdGsPalette()
Definition: GsBitMap.h:44
virtual void getColors(OdUInt32 nColors, ODCOLORREF *pColors) const
virtual void setNumColors(OdUInt32 nColors)=0
virtual void setColorAt(OdUInt32 nIndex, OdUInt8 blue, OdUInt8 green, OdUInt8 red, OdUInt8 alpha=0)=0
virtual void colorAt(OdUInt32 nIndex, OdUInt8 &blue, OdUInt8 &green, OdUInt8 &red, OdUInt8 *pAlpha=0) const =0
virtual void setColors(OdUInt32 nColors, const ODCOLORREF *pColors)
GLfloat GLfloat GLfloat alpha
Definition: gles2_ext.h:147
GLint GLenum GLsizei width
Definition: gles2_ext.h:110
GLfloat GLfloat blue
Definition: gles2_ext.h:147
GLint GLenum GLsizei GLsizei height
Definition: gles2_ext.h:110
GLfloat green
Definition: gles2_ext.h:147