📄 pixman.h
字号:
/* icimage.c */typedef struct pixman_image pixman_image_t;pixman_private pixman_image_t *pixman_image_create (pixman_format_t *format, int width, int height);/* * This single define controls the basic size of data manipulated * by this software; it must be log2(sizeof (pixman_bits_t) * 8) *//* We use a 32-bit size on all platforms, (even those with native 64 * bit types). This is consistent with the code currently in the X * server, so it goes through much more well-tested code paths, (we * saw rendering bugs when we tried IC_SHIFT==6 and uint64_t for * pixman_bits_t on 64-bit platofrms). In addition, Keith says that * his testing indicates that using 32-bits everywhere is a * performance win in any case, (presumably due to 32-bit datapaths * between the processor and the video card).*/#ifndef IC_SHIFT#define IC_SHIFT 5#define FB_SHIFT IC_SHIFTtypedef uint32_t pixman_bits_t;#endifpixman_private pixman_image_t *pixman_image_create_for_data (pixman_bits_t *data, pixman_format_t *format, int width, int height, int bpp, int stride);pixman_private voidpixman_image_destroy (pixman_image_t *image);pixman_private intpixman_image_set_clip_region (pixman_image_t *image, pixman_region16_t *region);typedef int32_t pixman_fixed16_16_t;typedef struct pixman_point_fixed { pixman_fixed16_16_t x, y;} pixman_point_fixed_t;typedef struct pixman_line_fixed { pixman_point_fixed_t p1, p2;} pixman_line_fixed_t;/* XXX: It's goofy that pixman_rectangle_t has integers while all the other datatypes have fixed-point values. (Though by design, pixman_fill_rectangles is designed to fill only whole pixels) */typedef struct pixman_rectangle { short x, y; unsigned short width, height;} pixman_rectangle_t;typedef struct pixman_triangle { pixman_point_fixed_t p1, p2, p3;} pixman_triangle_t;typedef struct pixman_trapezoid { pixman_fixed16_16_t top, bottom; pixman_line_fixed_t left, right;} pixman_trapezoid_t;typedef struct pixman_vector { pixman_fixed16_16_t vector[3];} pixman_vector_t;typedef struct pixman_transform { pixman_fixed16_16_t matrix[3][3];} pixman_transform_t;typedef struct pixman_color { unsigned short red; unsigned short green; unsigned short blue; unsigned short alpha;} pixman_color_t;typedef struct _pixman_gradient_stop { pixman_fixed16_16_t x; pixman_color_t color;} pixman_gradient_stop_t;typedef struct _pixman_circle { pixman_fixed16_16_t x; pixman_fixed16_16_t y; pixman_fixed16_16_t radius;} pixman_circle_t;typedef struct pixman_linear_gradient { pixman_point_fixed_t p1; pixman_point_fixed_t p2;} pixman_linear_gradient_t;typedef struct pixman_radial_gradient { pixman_circle_t c1; pixman_circle_t c2;} pixman_radial_gradient_t;typedef enum { PIXMAN_FILTER_FAST, PIXMAN_FILTER_GOOD, PIXMAN_FILTER_BEST, PIXMAN_FILTER_NEAREST, PIXMAN_FILTER_BILINEAR} pixman_filter_t;pixman_private voidpixman_image_set_component_alpha (pixman_image_t *image, int component_alpha);pixman_private intpixman_image_set_transform (pixman_image_t *image, pixman_transform_t *transform);/* Don't blame me, blame XRender */typedef enum { PIXMAN_REPEAT_NONE, PIXMAN_REPEAT_NORMAL, PIXMAN_REPEAT_PAD, PIXMAN_REPEAT_REFLECT} pixman_repeat_t;pixman_private voidpixman_image_set_repeat (pixman_image_t *image, pixman_repeat_t repeat);pixman_private voidpixman_image_set_filter (pixman_image_t *image, pixman_filter_t filter);pixman_private intpixman_image_get_width (pixman_image_t *image);pixman_private intpixman_image_get_height (pixman_image_t *image);pixman_private intpixman_image_get_stride (pixman_image_t *image);pixman_private intpixman_image_get_depth (pixman_image_t *image);pixman_private pixman_format_t *pixman_image_get_format (pixman_image_t *image);pixman_private pixman_bits_t *pixman_image_get_data (pixman_image_t *image);pixman_private pixman_image_t *pixman_image_create_linear_gradient (const pixman_linear_gradient_t *gradient, const pixman_gradient_stop_t *stops, int n_stops);pixman_private pixman_image_t *pixman_image_create_radial_gradient (const pixman_radial_gradient_t *gradient, const pixman_gradient_stop_t *stops, int n_stops);/* iccolor.c */pixman_private voidpixman_color_to_pixel (const pixman_format_t *format, const pixman_color_t *color, pixman_bits_t *pixel);pixman_private voidpixman_pixel_to_color (const pixman_format_t *format, pixman_bits_t pixel, pixman_color_t *color);/* icrect.c */pixman_private voidpixman_fill_rectangle (pixman_operator_t op, pixman_image_t *dst, const pixman_color_t *color, int x, int y, unsigned int width, unsigned int height);pixman_private voidpixman_fill_rectangles (pixman_operator_t op, pixman_image_t *dst, const pixman_color_t *color, const pixman_rectangle_t *rects, int nRects);/* ictrap.c */pixman_private voidpixman_composite_trapezoids (pixman_operator_t op, pixman_image_t *src, pixman_image_t *dst, int xSrc, int ySrc, const pixman_trapezoid_t *traps, int ntrap);pixman_private voidpixman_add_trapezoids (pixman_image_t *dst, int x_off, int y_off, const pixman_trapezoid_t *traps, int ntraps);/* ictri.c */pixman_private voidpixman_composite_triangles (pixman_operator_t op, pixman_image_t *src, pixman_image_t *dst, int xSrc, int ySrc, const pixman_triangle_t *tris, int ntris);pixman_private voidpixman_composite_tri_strip (pixman_operator_t op, pixman_image_t *src, pixman_image_t *dst, int xSrc, int ySrc, const pixman_point_fixed_t *points, int npoints);pixman_private voidpixman_composite_tri_fan (pixman_operator_t op, pixman_image_t *src, pixman_image_t *dst, int xSrc, int ySrc, const pixman_point_fixed_t *points, int npoints);/* ic.c */pixman_private voidpixman_composite (pixman_operator_t op, pixman_image_t *iSrc, pixman_image_t *iMask, pixman_image_t *iDst, int xSrc, int ySrc, int xMask, int yMask, int xDst, int yDst, int width, int height);#if defined(__cplusplus) || defined(c_plusplus)}#endif#endif /* _PIXMAN_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -