sgxbitmap.hpp

来自「一个基于BREW上的WEB service程序,通过扫描图书的条形码,登陆WEB」· HPP 代码 · 共 65 行

HPP
65
字号
/**
***     Class Name                     : SGXBitmap
***     Version                        : 1.0.0
***
***     Author                         : Sophia Cradle Incorporated
***     Platform                       : x86, ARM
***     OS                             : BREW 2.1
***     Target SophiaFramework Version : 3.0
***     Compiler                       : Visual C++ 6.0, Visual C++ .NET 2003,
***                                      RVCTB 1.2
**/

#ifndef __SOPHIACRADLE_SGXBITMAP_HPP
#define __SOPHIACRADLE_SGXBITMAP_HPP

#include <SophiaFramework.hpp>

SFMTYPEDEFCLASS(SGXBitmap)
class SGXBitmap {
private:
    SFBBitmapSmp _pbitmap;      // 價僢僩儅僢僾傊偺億僀儞僞
    SFBDIBSmp _pdib;            // DIB 宍幃偺價僢僩儅僢僾傊偺億僀儞僞

public:
    explicit SGXBitmap(Void);
    explicit SGXBitmap(ACharConstPtr file);
    explicit SGXBitmap(WCharConstPtr file);
    explicit SGXBitmap(SFXAnsiStringConstRef file);
    explicit SGXBitmap(SFXWideStringConstRef file);
    explicit SGXBitmap(ACharConstPtr resFile, UInt16 id);
    explicit SGXBitmap(WCharConstPtr resFile, UInt16 id);
    explicit SGXBitmap(SFXAnsiStringConstRef resFile, UInt16 id);
    explicit SGXBitmap(SFXWideStringConstRef resFile, UInt16 id);
    explicit SGXBitmap(SFBBitmapSmpConstRef pbitmap);
    explicit SGXBitmap(SGXBitmapConstRef bitmap);
    virtual ~SGXBitmap(Void);
    SGXBitmapConstRef operator =(SFBBitmapSmpConstRef pbitmap);
    SGXBitmapConstRef operator =(SGXBitmapConstRef bitmap);
    SFCError LoadBitmap(ACharConstPtr file);
    SFCError LoadBitmap(WCharConstPtr file);
    SFCError LoadBitmap(SFXAnsiStringConstRef file);
    SFCError LoadBitmap(SFXWideStringConstRef file);
    SFCError LoadResBitmap(ACharConstPtr resFile, UInt16 id);
    SFCError LoadResBitmap(WCharConstPtr resFile, UInt16 id);
    SFCError LoadResBitmap(SFXAnsiStringConstRef resFile, UInt16 id);
    SFCError LoadResBitmap(SFXWideStringConstRef resFile, UInt16 id);
    SFCError Create(SFBBitmapSmpConstRef pbitmap);
    SFXRGBColor GetPixel(SFXPixelConstRef pixel) const;
    SFXRGBColor GetPixel(SInt16 x, SInt16 y) const;
    SFXSize GetSize(Void) const;
    UInt16 GetWidth(Void) const;
    UInt16 GetHeight(Void) const;
    UInt08 GetDepth(Void) const;
private:
    SFCError GetDib(Void);      // DIB 宍幃偺價僢僩儅僢僾傪庢摼偡傞
    SFCError Copy(SGXBitmapConstRef bitmap);    // 價僢僩儅僢僾傪僐僺乕偡傞
};

inline SFXRGBColor SGXBitmap::GetPixel(SInt16 x, SInt16 y) const
{
    return GetPixel(SFXPixel(x, y));
}

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?