CBitmapBase.h
Go to the documentation of this file.
1 #ifndef iimg_CBitmapBase_included
2 #define iimg_CBitmapBase_included
3 
4 
5 // ACF includes
6 #include <i2d/CObject2dBase.h>
7 #include <iimg/IBitmap.h>
8 
9 
10 namespace iimg
11 {
12 
13 
18  public i2d::CObject2dBase,
19  virtual public IBitmap
20 {
21 public:
23 
24  // reimplemented (i2d::IObject2d)
25  virtual i2d::CVector2d GetCenter() const;
26  virtual void MoveCenterTo(const i2d::CVector2d& position);
27  virtual i2d::CRectangle GetBoundingBox() const;
28 
29  // reimplemented (iimg::IBitmap)
30  virtual bool CreateImageFromRegion(const iimg::IBitmap& sourceBitmap, const i2d::CRect& region);
31  virtual int GetLineBytesCount() const;
32  virtual int GetComponentBitsCount(int componentIndex = 0) const;
33 
34  // reimplemented (iimg::IRasterImage)
35  virtual bool IsEmpty() const;
36  virtual icmm::CVarColor GetColorAt(const istd::CIndex2d& position) const;
37  virtual bool SetColorAt(const istd::CIndex2d& position, const icmm::CVarColor& color);
38 
39  // reimplemented (iser::ISerializable)
40  virtual bool Serialize(iser::IArchive& archive);
41 
42  // reimplemented (istd::IChangeable)
43  virtual bool ResetData(CompatibilityMode mode = CM_WITHOUT_REFS);
44 };
45 
46 
47 } // namespace iimg
48 
49 
50 #endif // !iimg_CBitmapBase_included
51 
52 
virtual i2d::CRectangle GetBoundingBox() const
Get bounding box of this shape.
External references are simple ignored.
Definition: IChangeable.h:197
CompatibilityMode
Control how relationship betweeen objects are interpreted.
Definition: IChangeable.h:186
virtual i2d::CVector2d GetCenter() const
Returns center of this 2D-object.
virtual bool SetColorAt(const istd::CIndex2d &position, const icmm::CVarColor &color)
Set color at specified pixel.
Simple rectangle with integer bounds.
Definition: CRect.h:21
Index implementation for addressing elements in 2D-space.
Definition: CIndex2d.h:20
virtual bool IsEmpty() const
Return true if this image is empty.
virtual bool Serialize(iser::IArchive &archive)
Load or store state of this object as a archive stream.
virtual bool ResetData(CompatibilityMode mode=CM_WITHOUT_REFS)
Reset data to its default state.
Generic color implementation with variable number of color components.
Definition: CVarColor.h:21
i2d::CObject2dBase BaseClass
Definition: CBitmapBase.h:22
Definition of single plane bitmap.
Definition: IBitmap.h:17
Represent input/output persistence archive.
Definition: IArchive.h:30
Definition of rectangle area orthogonal to axis of coordination system.
Definition: CRectangle.h:26
Definition of position or mathematical vector on 2D plane.
Definition: CVector2d.h:28
Base implementation of some iimg::IBitmap methods.
Definition: CBitmapBase.h:17
Base class for 2D-objects implementing interface i2d::IObject2d.
Definition: CObject2dBase.h:18
virtual int GetComponentBitsCount(int componentIndex=0) const
Get number of bits per single pixel component.
virtual int GetLineBytesCount() const
Number of bytes per single line.
virtual bool CreateImageFromRegion(const iimg::IBitmap &sourceBitmap, const i2d::CRect &region)
Create image as a copy of rectangular region of some other image.
virtual void MoveCenterTo(const i2d::CVector2d &position)
Move object to position position.
virtual icmm::CVarColor GetColorAt(const istd::CIndex2d &position) const
Get color at specified pixel.

© 2007-2017 Witold Gantzke and Kirill Lepskiy