CFx SDK Documentation  2020SP3
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_
OdGsBitMap::setBits
virtual void setBits(const OdUInt8 *pData, OdUInt32 nSize)=0
OdGsBitMap::palette
virtual const OdGsPalette * palette() const =0
OdGsBitMap::bits
virtual const OdUInt8 * bits() const =0
OdUInt8
unsigned char OdUInt8
Definition: OdPlatformSettings.h:759
OdGsBitMap::create
virtual void create(OdUInt32 width, OdUInt32 height, OdUInt8 bitCount)=0
OdGsPalette::setNumColors
virtual void setNumColors(OdUInt32 nColors)=0
OdGsPalette::getColors
virtual void getColors(OdUInt32 nColors, ODCOLORREF *pColors) const
OdGsPalette::numColors
virtual OdUInt32 numColors() const =0
green
GLfloat green
Definition: gles2_ext.h:147
OdGsPalette::colorAt
virtual void colorAt(OdUInt32 nIndex, OdUInt8 &blue, OdUInt8 &green, OdUInt8 &red, OdUInt8 *pAlpha=0) const =0
OdRxObject
Definition: RxObject.h:564
OdGsPalette::OdGsPalette
OdGsPalette()
Definition: GsBitMap.h:44
blue
GLfloat GLfloat blue
Definition: gles2_ext.h:147
OdGsBitMap::bitDataSize
virtual OdUInt32 bitDataSize() const
OdGsBitMap::palette
virtual OdGsPalette * palette()=0
OdGsBitMap::height
virtual OdUInt32 height() const =0
RxObject.h
OdGsPalette::setColors
virtual void setColors(OdUInt32 nColors, const ODCOLORREF *pColors)
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdGsPalettePtr
OdSmartPtr< OdGsPalette > OdGsPalettePtr
Definition: GsBitMap.h:54
OdGsPalette
Definition: GsBitMap.h:41
OdStreamBuf.h
OdGsPalette::setColorAt
virtual void setColorAt(OdUInt32 nIndex, OdUInt8 blue, OdUInt8 green, OdUInt8 red, OdUInt8 alpha=0)=0
OdSmartPtr
Definition: SmartPtr.h:58
Gs.h
OdGsBitMap::bytePerLine
virtual OdUInt32 bytePerLine() const
height
GLint GLenum GLsizei GLsizei height
Definition: gles2_ext.h:110
width
GLint GLenum GLsizei width
Definition: gles2_ext.h:110
SmartPtr.h
OdGsBitMapPtr
OdSmartPtr< OdGsBitMap > OdGsBitMapPtr
Definition: GsBitMap.h:82
OdGsPalette::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGsPalette)
OdGsBitMap::OdGsBitMap
OdGsBitMap()
Definition: GsBitMap.h:64
ODCOLORREF
#define ODCOLORREF
Definition: OdPlatform.h:883
OdGsBitMap::bitPerPixel
virtual OdUInt8 bitPerPixel() const =0
OdGsBitMap::width
virtual OdUInt32 width() const =0
alpha
GLfloat GLfloat GLfloat alpha
Definition: gles2_ext.h:147
OdGsBitMap
Definition: GsBitMap.h:62
OdGsBitMap::ODRX_DECLARE_MEMBERS
ODRX_DECLARE_MEMBERS(OdGsBitMap)