Mercurial > MadButterfly
comparison src/redraw_man.c @ 473:ba64f928542b Android_Skia
Remove mbe_matrix_t type.
The struct mbe_matrix_t is defined in a layout accoriding definition
of Cairo. It is not feasible for all graphic engine. Now, we start
supporting of other graphic engine; Skia, so use type of (co_aix[6])
defined and used by MadButterfly intead of mbe_matrix_t. And, bridges
of graphic engines are responsible for translate matrics into the
matrix type of the graphic enigne.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Thu, 12 Nov 2009 21:32:58 +0800 |
parents | 4dc0be6c044a |
children | 23c7667b3ec0 |
comparison
equal
deleted
inserted
replaced
472:4254eaa699d0 | 473:ba64f928542b |
---|---|
1911 static void update_cached_canvas_2_parent(redraw_man_t *rdman, | 1911 static void update_cached_canvas_2_parent(redraw_man_t *rdman, |
1912 coord_t *coord) { | 1912 coord_t *coord) { |
1913 mbe_t *pcanvas, *canvas; | 1913 mbe_t *pcanvas, *canvas; |
1914 mbe_surface_t *surface; | 1914 mbe_surface_t *surface; |
1915 mbe_pattern_t *pattern; | 1915 mbe_pattern_t *pattern; |
1916 mbe_matrix_t cr_matrix; | |
1917 co_aix reverse[6]; | 1916 co_aix reverse[6]; |
1918 co_aix canvas2pdev_matrix[6]; | 1917 co_aix canvas2pdev_matrix[6]; |
1919 | 1918 |
1920 if(coord_is_root(coord)) | 1919 if(coord_is_root(coord)) |
1921 return; | 1920 return; |
1922 | 1921 |
1923 compute_cached_2_pdev_matrix(coord, canvas2pdev_matrix); | 1922 compute_cached_2_pdev_matrix(coord, canvas2pdev_matrix); |
1924 compute_reverse(canvas2pdev_matrix, reverse); | 1923 compute_reverse(canvas2pdev_matrix, reverse); |
1925 | 1924 |
1926 cr_matrix.xx = reverse[0]; | |
1927 cr_matrix.xy = reverse[1]; | |
1928 cr_matrix.x0 = reverse[2]; | |
1929 cr_matrix.yx = reverse[3]; | |
1930 cr_matrix.yy = reverse[4]; | |
1931 cr_matrix.y0 = reverse[5]; | |
1932 | |
1933 canvas = _coord_get_canvas(coord); | 1925 canvas = _coord_get_canvas(coord); |
1934 pcanvas = _coord_get_canvas(coord->parent); | 1926 pcanvas = _coord_get_canvas(coord->parent); |
1935 surface = mbe_get_target(canvas); | 1927 surface = mbe_get_target(canvas); |
1936 pattern = mbe_pattern_create_for_surface(surface); | 1928 pattern = mbe_pattern_create_for_surface(surface); |
1937 mbe_pattern_set_matrix(pattern, &cr_matrix); | 1929 mbe_pattern_set_matrix(pattern, reverse); |
1938 mbe_set_source(pcanvas, pattern); | 1930 mbe_set_source(pcanvas, pattern); |
1939 mbe_paint_with_alpha(pcanvas, coord->opacity); | 1931 mbe_paint_with_alpha(pcanvas, coord->opacity); |
1940 } | 1932 } |
1941 | 1933 |
1942 static int draw_coord_shapes_in_dirty_areas(redraw_man_t *rdman, | 1934 static int draw_coord_shapes_in_dirty_areas(redraw_man_t *rdman, |