CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
GsBitMap.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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
40class OdGsPalette : public OdRxObject
41{
42public:
48
52 virtual OdUInt32 numColors() const = 0;
53
58 virtual void setNumColors(OdUInt32 nColors) = 0;
59
68 virtual void setColorAt(OdUInt32 nIndex, OdUInt8 blue, OdUInt8 green, OdUInt8 red, OdUInt8 alpha = 0) = 0;
69
78 virtual void colorAt(OdUInt32 nIndex, OdUInt8& blue, OdUInt8& green, OdUInt8& red, OdUInt8* pAlpha = 0) const = 0;
79
85 virtual void setColors(OdUInt32 nColors, const ODCOLORREF* pColors);
86
92 virtual void getColors(OdUInt32 nColors, ODCOLORREF* pColors) const;
93};
94
96
97
102class OdGsBitMap : public OdRxObject
103{
104protected:
106public:
108
112 virtual OdUInt32 width() const = 0;
113
117 virtual OdUInt32 height() const = 0;
118
122 virtual OdUInt8 bitPerPixel() const = 0;
123
130 virtual void create(OdUInt32 width, OdUInt32 height, OdUInt8 bitCount) = 0;
131
135 virtual OdUInt32 bitDataSize() const;
136
140 virtual OdUInt32 bytePerLine() const;
141
145 virtual const OdUInt8* bits() const = 0;
146
152 virtual void setBits(const OdUInt8* pData, OdUInt32 nSize) = 0;
153
157 virtual OdGsPalette* palette() = 0;
158
162 virtual const OdGsPalette* palette() const = 0;
163};
164
169
170#endif //_OD_GSBITMAP_H_
OdSmartPtr< OdGsBitMap > OdGsBitMapPtr
Definition: GsBitMap.h:168
OdSmartPtr< OdGsPalette > OdGsPalettePtr
Definition: GsBitMap.h:95
#define ODCOLORREF
Definition: OdPlatform.h:933
unsigned int OdUInt32
unsigned char OdUInt8
virtual OdUInt32 bitDataSize() const
virtual OdGsPalette * palette()=0
ODRX_DECLARE_MEMBERS(OdGsBitMap)
virtual const OdGsPalette * palette() const =0
virtual void create(OdUInt32 width, OdUInt32 height, OdUInt8 bitCount)=0
virtual const OdUInt8 * bits() const =0
OdGsBitMap()
Definition: GsBitMap.h:105
virtual void setBits(const OdUInt8 *pData, OdUInt32 nSize)=0
virtual OdUInt8 bitPerPixel() const =0
virtual OdUInt32 width() const =0
virtual OdUInt32 height() const =0
virtual OdUInt32 bytePerLine() const
ODRX_DECLARE_MEMBERS(OdGsPalette)
virtual OdUInt32 numColors() const =0
OdGsPalette()
Definition: GsBitMap.h:47
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