Guidance
指路人
g.yi.org
software / RapidQ / System / Win32 / Rapid-Q++ / rqcanvas.h

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
#if !defined RQCANVAS_H
#define RQCANVAS_H

#include <windows.h>
#include "rqcontrol.h"
#include "rqfont.h"
#include "rqdefs.h"

class RQBitmap;

class RQCanvas: public RQControl
{
private:
    HBRUSH *hBrush;
    HPEN   *hPen;
    HFONT  *hFont;
    RQFont *font;
    int hBrushCount, hPenCount, hFontCount;
    int hBrushMaxSize, hPenMaxSize, hFontMaxSize;
    void checkPenCount();
    void checkBrushCount();
    void checkFontCount();

public:
    RQCanvas();
    ~RQCanvas();

    void setHDC(HDC);
    void setFont(RQFont* font);
    void textOut(int x, int y, char const*, int fg, int bg);
    void line(int x1, int y1, int x2, int y2, int c);
    void rectangle(int x1, int y1, int x2, int y2, int c);
    void paint(int x, int y, int fillColor, int borderColor);
    int  getPixel(int x, int y);
    void setPixel(int x, int y, int c);
    void fillRect(int x1, int y1, int x2, int y2, int c);
    void roundRect(int x1, int y1, int x2, int y2, int w, int h, int c);
    void draw(int x, int y, RQBitmap& bitmap);
    void drawText(char const *text, int x1, int y1, int x2, int y2, int flags, int c);
    void freeResources();
};

#endif
掌柜推荐
 
 
¥860.00 ·
 
 
¥410.00 ·
 
 
¥288.00 ·
 
 
¥918.00 ·
 
 
¥288.00 ·
 
 
¥264.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-08-20 12:34:40