⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 render_rend.h.svn-base

📁 A Flash Player with ActionScript support. Write in C and C++. It have two part, one is Player and an
💻 SVN-BASE
字号:
#ifndef _RENDER_H_#define _RENDER_H_#define ALPHA_OPAQUE 255#include "xwin_pub.h"#include "shape_def.h"#include "base_types.h"struct tb {    unsigned long p1;    unsigned long p2;};typedef enum FillType {    f_Solid          = 0x00,    f_LinearGradient = 0x10,    f_RadialGradient = 0x12,    f_TiledBitmap    = 0x40,    f_clippedBitmap  = 0x41,    f_None	 = 0x80}FillType;typedef struct Gradient Gradient;typedef struct FillStyle     FillStyleDef;typedef struct Segment {    long 		x1,x2;    long		ymax;    FillStyleDef	*fs[2];	// 0 is left 1 is right    int		 	aa;    long		dX;    long		X;    struct Segment 	*next;    struct Segment 	*nextValid;}Segment;#define FRAC_BITS    5#define FRAC         (1 << FRAC_BITS)#define NB_SEGMENT_MAX (2048*4)#define SEGFRAC	     8struct grend {    int                     num;    int                      g_has_alpha;    struct Matrix                   g_imat;    struct RGBA                  *g_ramp;    struct grend *           next;};struct brend {    int                     num;    struct Matrix                   BitmapMatrix;    struct RGBA               *cmap;    unsigned char *alpha_table;    struct brend * next;};typedef struct GraphicDevice {    //first part    int			 targetWidth;    int 		 targetHeight;    struct RECT		 viewPort;    int			 movieWidth;    int			 movieHeight;    int			 zoom;    unsigned long	 redMask;    unsigned long	 greenMask;    unsigned long	 blueMask;    int			 clipping;    //    //second part    FlashDisplay	*flashDisplay;    int			 bgInitialized;    struct RGBA		 backgroundColor;    struct RGBA		 foregroundColor;    //third part    void 		*scan_line_func_id;    ScanLineFunc 	scan_line_func;    struct RECT		clip_rect;    //forth part    Segment 		**thissegs;    Segment 		**thissegs1;    int 		thisymin,thisymax;    int 		thisheight;    Segment 		*seg_pool;    Segment 		*seg_pool_cur;    //fifth part    struct Matrix		*adjust;	// Matrix to fit window (shrink or expand)    long		showMore;	// Used for debugging    // For Direct Graphics    unsigned char 	*canvasBuffer;	// A pointer to canvas'memory    long		bpl;	// Bytes per line    long		bpp;	// Bytes per pixel    long		pad;}GraphicDevice;/*FillStyleDefPrepare() {        style_size += sizeof(FillStyleDef);        style_nb++;    }*/long allocColor16(GraphicDevice *gd,struct RGBA color);void clearCanvas16(GraphicDevice *gd,int first_frame);void fillLineAA16(GraphicDevice *gd,FillStyleDef *f, long y, long start, long end);void fillLine16(GraphicDevice *gd,FillStyleDef *f, long y, long start, long end);void fillLineBitmap(GraphicDevice *gd,FillStyleDef *f, long y, long start, long end);void fillLineLG16(GraphicDevice *gd,struct Gradient *grad, long y, long start, long end);void fillLineRG16(GraphicDevice *gd,struct Gradient *grad, long y, long start, long end);void drawLine16(GraphicDevice *gd,long x1, long y1, long x2, long y2, long width);Segment * allocSeg(GraphicDevice *gd);Segment * progressSegments(GraphicDevice *gd,Segment * curSegs, long y);Segment * newSegments(GraphicDevice *gd,Segment *curSegs, Segment *newSegs);void      renderScanLine(GraphicDevice *gd,long y, Segment *curSegs);long	 clip(GraphicDevice *gd,long *y, long *start, long *end);int	 setBackgroundColor(GraphicDevice *gd,struct RGBA Color);void	 setForegroundColor(GraphicDevice *gd,struct RGBA Color);struct RGBA getBackgroundColor(GraphicDevice *gd);struct RGBA getForegroundColor(GraphicDevice *gd);void	 setMovieDimension(GraphicDevice *gd,long width, long height);void	 setMovieZoom(GraphicDevice *gd,int zoom);void	 setMovieOffset(GraphicDevice *gd,long x, long y);long	 getWidth(GraphicDevice *gd);long	 getHeight(GraphicDevice *gd);struct RGBA *getColormap(GraphicDevice *gd,struct RGBA *old, long n, struct CxFormWithAlpha *cxform);void 	 drawBox(GraphicDevice *gd,long x1, long y1, long x2, long y2);void     addSegment(GraphicDevice *gd,long x1, long y1, long x2, long y2,                    FillStyleDef *f0,                    FillStyleDef *f1,                    int aa);void     drawPolygon(GraphicDevice *gd);void	 updateClippingRegion(GraphicDevice *gd,struct RECT *);void	 setClipping(GraphicDevice *gd,int x);#endif

⌨️ 快捷键说明

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