head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2004.05.05.22.18.29; author yimyom; state Exp; branches; next 1.3; 1.3 date 2004.04.18.03.04.00; author yimyom; state Exp; branches; next 1.2; 1.2 date 2004.04.11.03.02.58; author yimyom; state Exp; branches; next 1.1; 1.1 date 2004.04.11.02.58.41; author yimyom; state Exp; branches; next ; desc @@ 1.4 log @Update and update. Towards C++ bindings for libpixman @ text @#ifndef _PIXMAN_HPP_ #define _PIXMAN_HPP_ // C++ Bindings for Cairo // Declaration of C++ pixman bindings // // Copyright (C) 2004 David Bellot // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // Author : David Bellot #include // ################ // Pixman namespace // ################ namespace Pixman { // Typedef statements typedef pixman_operator_t operator; typedef pixman_format_name_t format_name; typedef pixman_region_status_t status; typedef enum {rgnOUT, rgnIN, rgnPART} rgn; typedef pixman_format_tName tName; // XXX format_tName or tName typedef pixman_fixed16_16_t fixed16_16; typedef pixman_point_fixed_t point_fixed; typedef pixman_line_fixed_t line_fixed; typedef pixman_rectangle_t rectangle; typedef pixman_triangle_t triangle; typedef pixman_trapezoid_t trapezoid; typedef pixman_vector_t vector typedef pixman_transform_t transform; typedef pixman_filter_t filter; // #################### // Classes declarations // #################### class box16 { public: box16(); ~box16(); private: pixman_box16_t *obj; }; class format { public: format(tName name); format(int bpp, int alpha_mask, int red_mask, int green_mask, int blue_mask); ~format(); void color_to_pixel(const pixman_color_t *color, pixman_bits_t *pixel); void pixel_to_color(pixman_bits_t pixel, pixman_color_t *color); private: pixman_format_t *obj; }; class image { public: image(format& f, int width, int height); image(pixman_bits_t *data, format& f, int width, int height, int bpp, int stride); ~image(); int set_clip_region(region16& region); int set_transform(pixman_transform_t *transform); void set_repeat(int repeat); void set_filter(filter f); int get_width(); int get_height(); int get_stride(); int get_depth(); format get_format(); pixman_bits_t *get_data(); void fill_rectangle(pixman_operator_t op,const pixman_color_t *color, int x, int y, unsigned int width, unsigned int height); void fill_rectangles(pixman_operator_t op,const pixman_color_t *color, const pixman_rectangle_t *rects, int nRects); void composite_trapezoids(pixman_operator_t op, image& src, int xSrc, int ySrc, const pixman_trapezoid_t *traps, int ntrap); void composite_triangles(pixman_operator_t op , image& src, int xSrc, int ySrc, const pixman_triangle_t *tris, int ntris); void composite_tri_strip(pixman_operator_t op , image& src, int xSrc, int ySrc, const pixman_point_fixed_t *points, int npoints); void composite_tri_fan(pixman_operator_t op , image& src, int xSrc, int ySrc, const pixman_point_fixed_t *points, int npoints); void composite(pixman_operator_t op, image& iSrc, image& iMask, int xSrc, int ySrc, int xMask, int yMask, int xDst, int yDst, int width, int height); private: }; class region16 { public: region16(); region16(box16& extents); ~region16(); void translate(int x, int y); status copy(region16& dest); // XXX operator = status intersect(region16& reg1, region16& reg2); //XXX operator & status union(region16& reg1, region16& reg2); //XXX operator | status union_rect(region16& src, int x, int y, unsigned int width, unsigned int height); status substract(region16& regM, region16& regS); //XXX operator - status inverse(region16& reg1, box16& invRect); //XXX int num_rects(); box16 rects(); //XXX int contains_point(int x, int y, box16& box); int contains_rectangle(box16& prect); int not_empty(); box16 extents(); //XXX status append(region16& src); // XXX operator << status validate(int *pOverlap); void reset(box16 &pBox); void empty(); private: pixman_region16_t *obj; }; @ 1.3 log @etc etc ... @ text @a54 80 class AccessMap { public: private: }; class CompositeFunc { public: private: }; class CombineFunc { public: private: }; class CompSrc { public: private: }; class IndexType { public: private: }; class Pixels { public: private: }; class Point { public: private: }; class Stip { public: private: }; class Stride { public: private: }; class MergeRopPtr { public: private: }; class MergeRopRec { public: private: }; class compositeFetch { public: private: }; class compositeOperand { public: private: }; class compositeSet { public: private: }; class compositeStep { public: private: }; class compositeStore { public: private: }; a62 10 class color { public: private: }; class fixed16_16 { public: private: }; a74 5 class format_tName { public: private: }; a101 15 class line_fixed { public: private: }; class operator { public: private: }; class point_fixed { public: private: }; a129 85 class region_status { public: private: }; class transform { public: private: }; class region16_tData { public: private: }; class region16_tPoint { public: private: }; } class DirectFormatPtr { public: private: }; class Mask { public: private: }; class PictFormatPtr { public: private: }; class PicturePtr { public: private: }; class Pixel { public: private: }; class xFixed { public: private: }; class xFixed_16_16 { public: private: }; class xFixed_1_16 { public: private: }; class xFixed_1_31 { public: private: }; class xFixed_32_32 { public: private: }; class xFixed_32_32 { public: private: }; class xFixed_32_32 { public: private: }; @ 1.2 log @Copyright notes @ text @d1 3 d23 4 a26 1 // Author : David Bellot a27 4 class CompositeFunc { public: private: }; d29 3 a31 3 // ############ // Ic namespace // ############ d33 1 a33 1 namespace Ic { d35 19 a53 1 typedef pixman_operator_t ic_operator; d60 4 a63 1 a108 14 } // ################ // Pixman namespace // ################ namespace Pixman { typedef pixman_region_status_t status; typedef enum {rgnOUT, rgnIN, rgnPART} rgn; typedef pixman_format_tName tName; // XXX format_tName or tName typedef pixman_fixed16_16_t; fixed16_16; typedef pixman_point_fixed_t point_fixed; typedef pixman_line_fixed_t line_fixed; d137 2 d140 1 a147 5 class filter { public: private: }; d162 1 d172 1 a172 1 image(int width, int height); d179 1 a179 1 void set_filter(pixman_filter_t filter); a211 5 class rectangle { public: private: }; d219 6 a224 6 status copy(region16& dest); status intersect(pixman_region16_t *newReg, pixman_region16_t *reg1, pixman_region16_t *reg2); //XXX status union(pixman_region16_t *newReg, pixman_region16_t *reg1, pixman_region16_t *reg2); //XXX status union_rect(region16& dest, int x, int y, unsigned int width, unsigned int height); status substract(pixman_region16_t *regD, pixman_region16_t *regM, pixman_region16_t *regS); //XXX status inverse(pixman_region16_t *newReg, pixman_region16_t *reg1, pixman_box16_t *invRect); //XXX d232 1 a232 1 status append(region16& src); // XXX operator a250 15 class trapezoid { public: private: }; class triangle { public: private: }; class vector { public: private: }; @ 1.1 log @skel for the library @ text @d1 5 a5 3 // C++ Bindings of Cairo // Copyright (C) 2004 David Bellot // d10 1 a10 1 // d15 1 a15 1 // d19 1 a19 1 @