w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

pixman-image.c
Go to the documentation of this file.
1 /*
2  * Copyright © 2000 SuSE, Inc.
3  * Copyright © 2007 Red Hat, Inc.
4  *
5  * Permission to use, copy, modify, distribute, and sell this software and its
6  * documentation for any purpose is hereby granted without fee, provided that
7  * the above copyright notice appear in all copies and that both that
8  * copyright notice and this permission notice appear in supporting
9  * documentation, and that the name of SuSE not be used in advertising or
10  * publicity pertaining to distribution of the software without specific,
11  * written prior permission. SuSE makes no representations about the
12  * suitability of this software for any purpose. It is provided "as is"
13  * without express or implied warranty.
14  *
15  * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
17  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
19  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
20  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21  */
22 
23 #ifdef HAVE_CONFIG_H
24 #include <config.h>
25 #endif
26 
27 #include <stdlib.h>
28 #include <stdio.h>
29 #include <string.h>
30 #include <assert.h>
31 
32 #include "pixman-private.h"
33 
34 static const pixman_color_t transparent_black = { 0, 0, 0, 0 };
35 
36 static void
38 {
39  gradient_t *gradient = &image->gradient;
40  int n = gradient->n_stops;
44 
45  switch (gradient->common.repeat)
46  {
47  default:
48  case PIXMAN_REPEAT_NONE:
49  begin->x = INT32_MIN;
50  begin->color = transparent_black;
51  end->x = INT32_MAX;
52  end->color = transparent_black;
53  break;
54 
56  begin->x = stops[n - 1].x - pixman_fixed_1;
57  begin->color = stops[n - 1].color;
58  end->x = stops[0].x + pixman_fixed_1;
59  end->color = stops[0].color;
60  break;
61 
63  begin->x = - stops[0].x;
64  begin->color = stops[0].color;
65  end->x = pixman_int_to_fixed (2) - stops[n - 1].x;
66  end->color = stops[n - 1].color;
67  break;
68 
69  case PIXMAN_REPEAT_PAD:
70  begin->x = INT32_MIN;
71  begin->color = stops[0].color;
72  end->x = INT32_MAX;
73  end->color = stops[n - 1].color;
74  break;
75  }
76 }
77 
80  const pixman_gradient_stop_t *stops,
81  int n_stops)
82 {
83  return_val_if_fail (n_stops > 0, FALSE);
84 
85  /* We allocate two extra stops, one before the beginning of the stop list,
86  * and one after the end. These stops are initialized to whatever color
87  * would be used for positions outside the range of the stop list.
88  *
89  * This saves a bit of computation in the gradient walker.
90  *
91  * The pointer we store in the gradient_t struct still points to the
92  * first user-supplied struct, so when freeing, we will have to
93  * subtract one.
94  */
95  gradient->stops =
96  pixman_malloc_ab (n_stops + 2, sizeof (pixman_gradient_stop_t));
97  if (!gradient->stops)
98  return FALSE;
99 
100  gradient->stops += 1;
101  memcpy (gradient->stops, stops, n_stops * sizeof (pixman_gradient_stop_t));
102  gradient->n_stops = n_stops;
103 
105 
106  return TRUE;
107 }
108 
109 void
111 {
112  image_common_t *common = &image->common;
113 
114  pixman_region32_init (&common->clip_region);
115 
116  common->alpha_count = 0;
117  common->have_clip_region = FALSE;
118  common->clip_sources = FALSE;
119  common->transform = NULL;
120  common->repeat = PIXMAN_REPEAT_NONE;
121  common->filter = PIXMAN_FILTER_NEAREST;
122  common->filter_params = NULL;
123  common->n_filter_params = 0;
124  common->alpha_map = NULL;
125  common->component_alpha = FALSE;
126  common->ref_count = 1;
127  common->property_changed = NULL;
128  common->client_clip = FALSE;
129  common->destroy_func = NULL;
130  common->destroy_data = NULL;
131  common->dirty = TRUE;
132 }
133 
136 {
138 
139  common->ref_count--;
140 
141  if (common->ref_count == 0)
142  {
143  if (image->common.destroy_func)
144  image->common.destroy_func (image, image->common.destroy_data);
145 
146  pixman_region32_fini (&common->clip_region);
147 
148  free (common->transform);
149  free (common->filter_params);
150 
151  if (common->alpha_map)
152  pixman_image_unref ((pixman_image_t *)common->alpha_map);
153 
154  if (image->type == LINEAR ||
155  image->type == RADIAL ||
156  image->type == CONICAL)
157  {
158  if (image->gradient.stops)
159  {
160  /* See _pixman_init_gradient() for an explanation of the - 1 */
161  free (image->gradient.stops - 1);
162  }
163 
164  /* This will trigger if someone adds a property_changed
165  * method to the linear/radial/conical gradient overwriting
166  * the general one.
167  */
168  assert (
169  image->common.property_changed == gradient_property_changed);
170  }
171 
172  if (image->type == BITS && image->bits.free_me)
173  free (image->bits.free_me);
174 
175  return TRUE;
176  }
177 
178  return FALSE;
179 }
180 
183 {
185 
186  if (image)
188 
189  return image;
190 }
191 
192 static void
194 {
195  image->common.dirty = TRUE;
196 }
197 
198 /* Ref Counting */
201 {
202  image->common.ref_count++;
203 
204  return image;
205 }
206 
207 /* returns TRUE when the image is freed */
210 {
212  {
213  free (image);
214  return TRUE;
215  }
216 
217  return FALSE;
218 }
219 
220 PIXMAN_EXPORT void
223  void * data)
224 {
225  image->common.destroy_func = func;
226  image->common.destroy_data = data;
227 }
228 
229 PIXMAN_EXPORT void *
231 {
232  return image->common.destroy_data;
233 }
234 
235 void
237 {
238  image->common.have_clip_region = FALSE;
239 }
240 
241 /* Executive Summary: This function is a no-op that only exists
242  * for historical reasons.
243  *
244  * There used to be a bug in the X server where it would rely on
245  * out-of-bounds accesses when it was asked to composite with a
246  * window as the source. It would create a pixman image pointing
247  * to some bogus position in memory, but then set a clip region
248  * to the position where the actual bits were.
249  *
250  * Due to a bug in old versions of pixman, where it would not clip
251  * against the image bounds when a clip region was set, this would
252  * actually work. So when the pixman bug was fixed, a workaround was
253  * added to allow certain out-of-bound accesses. This function disabled
254  * those workarounds.
255  *
256  * Since 0.21.2, pixman doesn't do these workarounds anymore, so now
257  * this function is a no-op.
258  */
259 PIXMAN_EXPORT void
261 {
262 }
263 
264 static void
266 {
268  uint32_t flags = 0;
269 
270  /* Transform */
271  if (!image->common.transform)
272  {
277  }
278  else
279  {
281 
282  if (image->common.transform->matrix[2][0] == 0 &&
283  image->common.transform->matrix[2][1] == 0 &&
284  image->common.transform->matrix[2][2] == pixman_fixed_1)
285  {
287 
288  if (image->common.transform->matrix[0][1] == 0 &&
289  image->common.transform->matrix[1][0] == 0)
290  {
291  if (image->common.transform->matrix[0][0] == -pixman_fixed_1 &&
292  image->common.transform->matrix[1][1] == -pixman_fixed_1)
293  {
295  }
297  }
298  else if (image->common.transform->matrix[0][0] == 0 &&
299  image->common.transform->matrix[1][1] == 0)
300  {
301  pixman_fixed_t m01 = image->common.transform->matrix[0][1];
302  pixman_fixed_t m10 = image->common.transform->matrix[1][0];
303 
304  if (m01 == -pixman_fixed_1 && m10 == pixman_fixed_1)
306  else if (m01 == pixman_fixed_1 && m10 == -pixman_fixed_1)
308  }
309  }
310 
311  if (image->common.transform->matrix[0][0] > 0)
313 
314  if (image->common.transform->matrix[1][0] == 0)
316  }
317 
318  /* Filter */
319  switch (image->common.filter)
320  {
322  case PIXMAN_FILTER_FAST:
324  break;
325 
327  case PIXMAN_FILTER_GOOD:
328  case PIXMAN_FILTER_BEST:
330 
331  /* Here we have a chance to optimize BILINEAR filter to NEAREST if
332  * they are equivalent for the currently used transformation matrix.
333  */
335  {
337  }
339  {
340  /* Suppose the transform is
341  *
342  * [ t00, t01, t02 ]
343  * [ t10, t11, t12 ]
344  * [ 0, 0, 1 ]
345  *
346  * and the destination coordinates are (n + 0.5, m + 0.5). Then
347  * the transformed x coordinate is:
348  *
349  * tx = t00 * (n + 0.5) + t01 * (m + 0.5) + t02
350  * = t00 * n + t01 * m + t02 + (t00 + t01) * 0.5
351  *
352  * which implies that if t00, t01 and t02 are all integers
353  * and (t00 + t01) is odd, then tx will be an integer plus 0.5,
354  * which means a BILINEAR filter will reduce to NEAREST. The same
355  * applies in the y direction
356  */
357  pixman_fixed_t (*t)[3] = image->common.transform->matrix;
358 
359  if ((pixman_fixed_frac (
360  t[0][0] | t[0][1] | t[0][2] |
361  t[1][0] | t[1][1] | t[1][2]) == 0) &&
363  (t[0][0] + t[0][1]) & (t[1][0] + t[1][1])) % 2) == 1)
364  {
365  /* FIXME: there are some affine-test failures, showing that
366  * handling of BILINEAR and NEAREST filter is not quite
367  * equivalent when getting close to 32K for the translation
368  * components of the matrix. That's likely some bug, but for
369  * now just skip BILINEAR->NEAREST optimization in this case.
370  */
371  pixman_fixed_t magic_limit = pixman_int_to_fixed (30000);
372  if (image->common.transform->matrix[0][2] <= magic_limit &&
373  image->common.transform->matrix[1][2] <= magic_limit &&
374  image->common.transform->matrix[0][2] >= -magic_limit &&
375  image->common.transform->matrix[1][2] >= -magic_limit)
376  {
378  }
379  }
380  }
381  break;
382 
384  break;
385 
388  break;
389 
390  default:
392  break;
393  }
394 
395  /* Repeat mode */
396  switch (image->common.repeat)
397  {
398  case PIXMAN_REPEAT_NONE:
399  flags |=
403  break;
404 
406  flags |=
410  break;
411 
412  case PIXMAN_REPEAT_PAD:
413  flags |=
417  break;
418 
419  default:
420  flags |=
424  break;
425  }
426 
427  /* Component alpha */
428  if (image->common.component_alpha)
430  else
432 
434 
435  /* Type specific checks */
436  switch (image->type)
437  {
438  case SOLID:
439  code = PIXMAN_solid;
440 
441  if (image->solid.color.alpha == 0xffff)
443  break;
444 
445  case BITS:
446  if (image->bits.width == 1 &&
447  image->bits.height == 1 &&
448  image->common.repeat != PIXMAN_REPEAT_NONE)
449  {
450  code = PIXMAN_solid;
451  }
452  else
453  {
454  code = image->bits.format;
456  }
457 
458  if (!PIXMAN_FORMAT_A (image->bits.format) &&
459  PIXMAN_FORMAT_TYPE (image->bits.format) != PIXMAN_TYPE_GRAY &&
460  PIXMAN_FORMAT_TYPE (image->bits.format) != PIXMAN_TYPE_COLOR)
461  {
463 
464  if (image->common.repeat != PIXMAN_REPEAT_NONE)
466  }
467 
468  if (image->bits.read_func || image->bits.write_func)
469  flags &= ~~FAST_PATH_NO_ACCESSORS;
470 
471  if (PIXMAN_FORMAT_IS_WIDE (image->bits.format))
473  break;
474 
475  case RADIAL:
477 
478  /*
479  * As explained in pixman-radial-gradient.c, every point of
480  * the plane has a valid associated radius (and thus will be
481  * colored) if and only if a is negative (i.e. one of the two
482  * circles contains the other one).
483  */
484 
485  if (image->radial.a >= 0)
486  break;
487 
488  /* Fall through */
489 
490  case CONICAL:
491  case LINEAR:
493 
494  if (image->common.repeat != PIXMAN_REPEAT_NONE)
495  {
496  int i;
497 
499  for (i = 0; i < image->gradient.n_stops; ++i)
500  {
501  if (image->gradient.stops[i].color.alpha != 0xffff)
502  {
503  flags &= ~~FAST_PATH_IS_OPAQUE;
504  break;
505  }
506  }
507  }
508  break;
509 
510  default:
512  break;
513  }
514 
515  /* Alpha maps are only supported for BITS images, so it's always
516  * safe to ignore their presense for non-BITS images
517  */
518  if (!image->common.alpha_map || image->type != BITS)
519  {
521  }
522  else
523  {
524  if (PIXMAN_FORMAT_IS_WIDE (image->common.alpha_map->format))
526  }
527 
528  /* Both alpha maps and convolution filters can introduce
529  * non-opaqueness in otherwise opaque images. Also
530  * an image with component alpha turned on is only opaque
531  * if all channels are opaque, so we simply turn it off
532  * unconditionally for those images.
533  */
534  if (image->common.alpha_map ||
535  image->common.filter == PIXMAN_FILTER_CONVOLUTION ||
536  image->common.filter == PIXMAN_FILTER_SEPARABLE_CONVOLUTION ||
537  image->common.component_alpha)
538  {
540  }
541 
542  image->common.flags = flags;
543  image->common.extended_format_code = code;
544 }
545 
546 void
548 {
549  if (image->common.dirty)
550  {
552 
553  /* It is important that property_changed is
554  * called *after* compute_image_info() because
555  * property_changed() can make use of the flags
556  * to set up accessors etc.
557  */
558  if (image->common.property_changed)
559  image->common.property_changed (image);
560 
561  image->common.dirty = FALSE;
562  }
563 
564  if (image->common.alpha_map)
565  _pixman_image_validate ((pixman_image_t *)image->common.alpha_map);
566 }
567 
571 {
574 
575  if (region)
576  {
577  if ((result = pixman_region32_copy (&common->clip_region, region)))
578  image->common.have_clip_region = TRUE;
579  }
580  else
581  {
583 
584  result = TRUE;
585  }
586 
588 
589  return result;
590 }
591 
595 {
598 
599  if (region)
600  {
601  if ((result = pixman_region32_copy_from_region16 (&common->clip_region, region)))
602  image->common.have_clip_region = TRUE;
603  }
604  else
605  {
607 
608  result = TRUE;
609  }
610 
612 
613  return result;
614 }
615 
616 PIXMAN_EXPORT void
618  pixman_bool_t client_clip)
619 {
620  image->common.client_clip = client_clip;
621 }
622 
626 {
627  static const pixman_transform_t id =
628  {
629  { { pixman_fixed_1, 0, 0 },
630  { 0, pixman_fixed_1, 0 },
631  { 0, 0, pixman_fixed_1 } }
632  };
633 
636 
637  if (common->transform == transform)
638  return TRUE;
639 
640  if (!transform || memcmp (&id, transform, sizeof (pixman_transform_t)) == 0)
641  {
642  free (common->transform);
643  common->transform = NULL;
644  result = TRUE;
645 
646  goto out;
647  }
648 
649  if (common->transform &&
650  memcmp (common->transform, transform, sizeof (pixman_transform_t)) == 0)
651  {
652  return TRUE;
653  }
654 
655  if (common->transform == NULL)
656  common->transform = malloc (sizeof (pixman_transform_t));
657 
658  if (common->transform == NULL)
659  {
660  result = FALSE;
661 
662  goto out;
663  }
664 
665  memcpy (common->transform, transform, sizeof(pixman_transform_t));
666 
667  result = TRUE;
668 
669 out:
671 
672  return result;
673 }
674 
675 PIXMAN_EXPORT void
678 {
679  if (image->common.repeat == repeat)
680  return;
681 
682  image->common.repeat = repeat;
683 
685 }
686 
687 PIXMAN_EXPORT void
690 {
691  if (image->type == BITS)
692  {
693  if (image->bits.dither == dither)
694  return;
695 
696  image->bits.dither = dither;
697 
699  }
700 }
701 
702 PIXMAN_EXPORT void
704  int offset_x,
705  int offset_y)
706 {
707  if (image->type == BITS)
708  {
709  if (image->bits.dither_offset_x == offset_x &&
710  image->bits.dither_offset_y == offset_y)
711  {
712  return;
713  }
714 
715  image->bits.dither_offset_x = offset_x;
716  image->bits.dither_offset_y = offset_y;
717 
719  }
720 }
721 
725  const pixman_fixed_t *params,
726  int n_params)
727 {
729  pixman_fixed_t *new_params;
730 
731  if (params == common->filter_params && filter == common->filter)
732  return TRUE;
733 
735  {
736  int width = pixman_fixed_to_int (params[0]);
737  int height = pixman_fixed_to_int (params[1]);
738  int x_phase_bits = pixman_fixed_to_int (params[2]);
739  int y_phase_bits = pixman_fixed_to_int (params[3]);
740  int n_x_phases = (1 << x_phase_bits);
741  int n_y_phases = (1 << y_phase_bits);
742 
744  n_params == 4 + n_x_phases * width + n_y_phases * height, FALSE);
745  }
746 
747  new_params = NULL;
748  if (params)
749  {
750  new_params = pixman_malloc_ab (n_params, sizeof (pixman_fixed_t));
751  if (!new_params)
752  return FALSE;
753 
754  memcpy (new_params,
755  params, n_params * sizeof (pixman_fixed_t));
756  }
757 
758  common->filter = filter;
759 
760  if (common->filter_params)
761  free (common->filter_params);
762 
763  common->filter_params = new_params;
764  common->n_filter_params = n_params;
765 
767  return TRUE;
768 }
769 
770 PIXMAN_EXPORT void
772  pixman_bool_t clip_sources)
773 {
774  if (image->common.clip_sources == clip_sources)
775  return;
776 
777  image->common.clip_sources = clip_sources;
778 
780 }
781 
782 /* Unlike all the other property setters, this function does not
783  * copy the content of indexed. Doing this copying is simply
784  * way, way too expensive.
785  */
786 PIXMAN_EXPORT void
788  const pixman_indexed_t *indexed)
789 {
791 
792  if (bits->indexed == indexed)
793  return;
794 
795  bits->indexed = indexed;
796 
798 }
799 
800 PIXMAN_EXPORT void
802  pixman_image_t *alpha_map,
803  int16_t x,
804  int16_t y)
805 {
807 
808  return_if_fail (!alpha_map || alpha_map->type == BITS);
809 
810  if (alpha_map && common->alpha_count > 0)
811  {
812  /* If this image is being used as an alpha map itself,
813  * then you can't give it an alpha map of its own.
814  */
815  return;
816  }
817 
818  if (alpha_map && alpha_map->common.alpha_map)
819  {
820  /* If the image has an alpha map of its own,
821  * then it can't be used as an alpha map itself
822  */
823  return;
824  }
825 
826  if (common->alpha_map != (bits_image_t *)alpha_map)
827  {
828  if (common->alpha_map)
829  {
830  common->alpha_map->common.alpha_count--;
831 
832  pixman_image_unref ((pixman_image_t *)common->alpha_map);
833  }
834 
835  if (alpha_map)
836  {
837  common->alpha_map = (bits_image_t *)pixman_image_ref (alpha_map);
838 
839  common->alpha_map->common.alpha_count++;
840  }
841  else
842  {
843  common->alpha_map = NULL;
844  }
845  }
846 
847  common->alpha_origin_x = x;
848  common->alpha_origin_y = y;
849 
851 }
852 
853 PIXMAN_EXPORT void
855  pixman_bool_t component_alpha)
856 {
857  if (image->common.component_alpha == component_alpha)
858  return;
859 
860  image->common.component_alpha = component_alpha;
861 
863 }
864 
867 {
868  return image->common.component_alpha;
869 }
870 
871 PIXMAN_EXPORT void
873  pixman_read_memory_func_t read_func,
874  pixman_write_memory_func_t write_func)
875 {
877 
878  if (image->type == BITS)
879  {
880  /* Accessors only work for <= 32 bpp. */
881  if (PIXMAN_FORMAT_BPP(image->bits.format) > 32)
882  return_if_fail (!read_func && !write_func);
883 
884  image->bits.read_func = read_func;
885  image->bits.write_func = write_func;
886 
888  }
889 }
890 
893 {
894  if (image->type == BITS)
895  return image->bits.bits;
896 
897  return NULL;
898 }
899 
900 PIXMAN_EXPORT int
902 {
903  if (image->type == BITS)
904  return image->bits.width;
905 
906  return 0;
907 }
908 
909 PIXMAN_EXPORT int
911 {
912  if (image->type == BITS)
913  return image->bits.height;
914 
915  return 0;
916 }
917 
918 PIXMAN_EXPORT int
920 {
921  if (image->type == BITS)
922  return image->bits.rowstride * (int) sizeof (uint32_t);
923 
924  return 0;
925 }
926 
927 PIXMAN_EXPORT int
929 {
930  if (image->type == BITS)
931  return PIXMAN_FORMAT_DEPTH (image->bits.format);
932 
933  return 0;
934 }
935 
938 {
939  if (image->type == BITS)
940  return image->bits.format;
941 
942  return PIXMAN_null;
943 }
944 
945 uint32_t
949 {
951 
952  if (image->type == SOLID)
953  {
954  result = image->solid.color_32;
955  }
956  else if (image->type == BITS)
957  {
958  if (image->bits.format == PIXMAN_a8r8g8b8)
959  result = image->bits.bits[0];
960  else if (image->bits.format == PIXMAN_x8r8g8b8)
961  result = image->bits.bits[0] | 0xff000000;
962  else if (image->bits.format == PIXMAN_a8)
963  result = (uint32_t)(*(uint8_t *)image->bits.bits) << 24;
964  else
965  goto otherwise;
966  }
967  else
968  {
969  pixman_iter_t iter;
970 
971  otherwise:
973  imp, &iter, image, 0, 0, 1, 1,
974  (uint8_t *)&result,
975  ITER_NARROW | ITER_SRC, image->common.flags);
976 
977  result = *iter.get_scanline (&iter, NULL);
978 
979  if (iter.fini)
980  iter.fini (&iter);
981  }
982 
983  /* If necessary, convert RGB <--> BGR. */
986  {
987  result = (((result & 0xff000000) >> 0) |
988  ((result & 0x00ff0000) >> 16) |
989  ((result & 0x0000ff00) >> 0) |
990  ((result & 0x000000ff) << 16));
991  }
992 
993  return result;
994 }
int code
Definition: aftopl.c:52
#define width(a)
Definition: aptex-macros.h:198
#define height(a)
Definition: aptex-macros.h:200
#define n
Definition: t4ht.c:1290
@ FALSE
Definition: dd.h:101
@ TRUE
Definition: dd.h:102
#define free(a)
Definition: decNumber.cpp:310
int params
Definition: definitions.c:42
struct rect data
Definition: dvipdfm.c:64
static FIELD_PTR begin
Definition: genind.c:37
#define memcmp(s1, s2, n)
Definition: gsftopk.c:66
#define memcpy(d, s, n)
Definition: gsftopk.c:64
int offset_x
Definition: hbf2gf.c:415
FILE * out
Definition: hbf2gf.c:286
int offset_y
Definition: hbf2gf.c:416
assert(pcxLoadImage24((char *)((void *) 0), fp, pinfo, hdr))
unsigned char * image
Definition: in_pcx.cpp:323
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p scientific i
Definition: afcover.h:80
sizeof(AF_ModuleRec)
kerning y
Definition: ttdriver.c:212
#define INT32_MAX
Definition: stdint.h:137
signed short int16_t
Definition: stdint.h:76
unsigned int uint32_t
Definition: stdint.h:80
#define INT32_MIN
Definition: stdint.h:136
unsigned char uint8_t
Definition: stdint.h:78
#define malloc
Definition: alloca.c:91
static luaL_Reg func[]
Definition: except.c:32
float x
Definition: cordic.py:15
static int format
Definition: pbmclean.c:15
#define PIXMAN_EXPORT
void pixman_image_set_component_alpha(pixman_image_t *image, pixman_bool_t component_alpha)
Definition: pixman-image.c:854
pixman_bool_t pixman_image_set_transform(pixman_image_t *image, const pixman_transform_t *transform)
Definition: pixman-image.c:624
void pixman_image_set_has_client_clip(pixman_image_t *image, pixman_bool_t client_clip)
Definition: pixman-image.c:617
pixman_bool_t _pixman_init_gradient(gradient_t *gradient, const pixman_gradient_stop_t *stops, int n_stops)
Definition: pixman-image.c:79
void * pixman_image_get_destroy_data(pixman_image_t *image)
Definition: pixman-image.c:230
pixman_bool_t pixman_image_set_clip_region32(pixman_image_t *image, pixman_region32_t *region)
Definition: pixman-image.c:569
static void image_property_changed(pixman_image_t *image)
Definition: pixman-image.c:193
pixman_format_code_t pixman_image_get_format(pixman_image_t *image)
Definition: pixman-image.c:937
void _pixman_image_validate(pixman_image_t *image)
Definition: pixman-image.c:547
void pixman_image_set_destroy_function(pixman_image_t *image, pixman_image_destroy_func_t func, void *data)
Definition: pixman-image.c:221
void _pixman_image_reset_clip_region(pixman_image_t *image)
Definition: pixman-image.c:236
void pixman_image_set_indexed(pixman_image_t *image, const pixman_indexed_t *indexed)
Definition: pixman-image.c:787
int pixman_image_get_width(pixman_image_t *image)
Definition: pixman-image.c:901
void _pixman_image_init(pixman_image_t *image)
Definition: pixman-image.c:110
int pixman_image_get_depth(pixman_image_t *image)
Definition: pixman-image.c:928
static const pixman_color_t transparent_black
Definition: pixman-image.c:34
pixman_bool_t pixman_image_set_clip_region(pixman_image_t *image, pixman_region16_t *region)
Definition: pixman-image.c:593
void pixman_image_set_alpha_map(pixman_image_t *image, pixman_image_t *alpha_map, int16_t x, int16_t y)
Definition: pixman-image.c:801
pixman_bool_t pixman_image_unref(pixman_image_t *image)
Definition: pixman-image.c:209
void pixman_image_set_dither_offset(pixman_image_t *image, int offset_x, int offset_y)
Definition: pixman-image.c:703
int pixman_image_get_height(pixman_image_t *image)
Definition: pixman-image.c:910
static void gradient_property_changed(pixman_image_t *image)
Definition: pixman-image.c:37
uint32_t _pixman_image_get_solid(pixman_implementation_t *imp, pixman_image_t *image, pixman_format_code_t format)
Definition: pixman-image.c:946
static void compute_image_info(pixman_image_t *image)
Definition: pixman-image.c:265
pixman_image_t * pixman_image_ref(pixman_image_t *image)
Definition: pixman-image.c:200
void pixman_image_set_source_clipping(pixman_image_t *image, pixman_bool_t clip_sources)
Definition: pixman-image.c:771
void pixman_image_set_accessors(pixman_image_t *image, pixman_read_memory_func_t read_func, pixman_write_memory_func_t write_func)
Definition: pixman-image.c:872
void pixman_image_set_repeat(pixman_image_t *image, pixman_repeat_t repeat)
Definition: pixman-image.c:676
pixman_image_t * _pixman_image_allocate(void)
Definition: pixman-image.c:182
uint32_t * pixman_image_get_data(pixman_image_t *image)
Definition: pixman-image.c:892
pixman_bool_t pixman_image_set_filter(pixman_image_t *image, pixman_filter_t filter, const pixman_fixed_t *params, int n_params)
Definition: pixman-image.c:723
pixman_bool_t _pixman_image_fini(pixman_image_t *image)
Definition: pixman-image.c:135
void pixman_image_set_dither(pixman_image_t *image, pixman_dither_t dither)
Definition: pixman-image.c:688
pixman_bool_t pixman_image_get_component_alpha(pixman_image_t *image)
Definition: pixman-image.c:866
int pixman_image_get_stride(pixman_image_t *image)
Definition: pixman-image.c:919
void pixman_disable_out_of_bounds_workaround(void)
Definition: pixman-image.c:260
void _pixman_implementation_iter_init(pixman_implementation_t *imp, pixman_iter_t *iter, pixman_image_t *image, int x, int y, int width, int height, uint8_t *buffer, iter_flags_t iter_flags, uint32_t image_flags)
#define FAST_PATH_Y_UNIT_ZERO
#define FAST_PATH_SEPARABLE_CONVOLUTION_FILTER
#define FAST_PATH_NO_ALPHA_MAP
#define FAST_PATH_NO_ACCESSORS
#define FAST_PATH_NO_CONVOLUTION_FILTER
pixman_bool_t pixman_region32_copy_from_region16(pixman_region32_t *dst, pixman_region16_t *src)
Definition: pixman-utils.c:270
#define FAST_PATH_HAS_TRANSFORM
#define FAST_PATH_AFFINE_TRANSFORM
#define return_if_fail(expr)
@ SOLID
@ RADIAL
@ CONICAL
@ BITS
@ LINEAR
#define PIXMAN_unknown
#define FAST_PATH_ROTATE_90_TRANSFORM
#define FAST_PATH_NEAREST_FILTER
#define FAST_PATH_ROTATE_270_TRANSFORM
#define FAST_PATH_BITS_IMAGE
#define FAST_PATH_COMPONENT_ALPHA
@ ITER_SRC
@ ITER_NARROW
#define PIXMAN_FORMAT_IS_WIDE(f)
#define FAST_PATH_SCALE_TRANSFORM
void * pixman_malloc_ab(unsigned int n, unsigned int b)
Definition: pixman-utils.c:61
#define FAST_PATH_ID_TRANSFORM
#define return_val_if_fail(expr, retval)
#define FAST_PATH_UNIFIED_ALPHA
#define FAST_PATH_NARROW_FORMAT
#define FAST_PATH_X_UNIT_POSITIVE
#define PIXMAN_solid
#define FAST_PATH_BILINEAR_FILTER
#define PIXMAN_null
#define FAST_PATH_IS_OPAQUE
#define FAST_PATH_NO_REFLECT_REPEAT
#define FAST_PATH_NO_NORMAL_REPEAT
#define FAST_PATH_ROTATE_180_TRANSFORM
#define FAST_PATH_SAMPLES_OPAQUE
#define FAST_PATH_NO_NONE_REPEAT
#define FAST_PATH_NO_PAD_REPEAT
void(* pixman_image_destroy_func_t)(pixman_image_t *image, void *data)
Definition: pixman.h:794
pixman_bool_t pixman_region32_copy(pixman_region32_t *dest, pixman_region32_t *source)
uint32_t(* pixman_read_memory_func_t)(const void *src, int size)
Definition: pixman.h:791
#define PIXMAN_TYPE_GRAY
Definition: pixman.h:856
#define PIXMAN_FORMAT_BPP(f)
Definition: pixman.h:837
#define pixman_int_to_fixed(i)
Definition: pixman.h:130
pixman_fixed_16_16_t pixman_fixed_t
Definition: pixman.h:123
#define pixman_fixed_1
Definition: pixman.h:126
#define PIXMAN_FORMAT_A(f)
Definition: pixman.h:840
pixman_repeat_t
Definition: pixman.h:340
@ PIXMAN_REPEAT_REFLECT
Definition: pixman.h:344
@ PIXMAN_REPEAT_NONE
Definition: pixman.h:341
@ PIXMAN_REPEAT_NORMAL
Definition: pixman.h:342
@ PIXMAN_REPEAT_PAD
Definition: pixman.h:343
void pixman_region32_init(pixman_region32_t *region)
#define PIXMAN_FORMAT_TYPE(f)
Definition: pixman.h:839
int pixman_bool_t
Definition: pixman.h:113
#define PIXMAN_TYPE_COLOR
Definition: pixman.h:855
#define PIXMAN_TYPE_ARGB_SRGB
Definition: pixman.h:861
#define pixman_fixed_to_int(f)
Definition: pixman.h:129
pixman_dither_t
Definition: pixman.h:348
void(* pixman_write_memory_func_t)(void *dst, uint32_t value, int size)
Definition: pixman.h:792
#define pixman_fixed_frac(f)
Definition: pixman.h:133
void pixman_region32_fini(pixman_region32_t *region)
#define PIXMAN_FORMAT_DEPTH(f)
Definition: pixman.h:846
pixman_format_code_t
Definition: pixman.h:871
@ PIXMAN_a8r8g8b8
Definition: pixman.h:878
@ PIXMAN_x8r8g8b8
Definition: pixman.h:879
@ PIXMAN_a8
Definition: pixman.h:913
pixman_filter_t
Definition: pixman.h:358
@ PIXMAN_FILTER_SEPARABLE_CONVOLUTION
Definition: pixman.h:385
@ PIXMAN_FILTER_NEAREST
Definition: pixman.h:362
@ PIXMAN_FILTER_GOOD
Definition: pixman.h:360
@ PIXMAN_FILTER_CONVOLUTION
Definition: pixman.h:364
@ PIXMAN_FILTER_BILINEAR
Definition: pixman.h:363
@ PIXMAN_FILTER_BEST
Definition: pixman.h:361
@ PIXMAN_FILTER_FAST
Definition: pixman.h:359
#define PIXMAN_TYPE_ARGB
Definition: pixman.h:853
static int filter
Definition: pnmtopng.c:113
static int repeat
Definition: pnmtops.c:230
int dither
Definition: ppmqvga.c:69
#define flags
#define uint32_t
Definition: stdint.in.h:168
Definition: namelist.c:170
Definition: inftrees.h:24
image_common_t common
pixman_gradient_stop_t * stops
property_changed_func_t property_changed
pixman_repeat_t repeat
bits_image_t * alpha_map
Definition: sd.h:76
float transform[6]
Definition: sd.h:78
pixman_fixed_t x
Definition: pixman.h:797
pixman_color_t color
Definition: pixman.h:798
pixman_iter_get_scanline_t get_scanline
pixman_iter_fini_t fini
Definition: regions.h:31
Definition: dvips.h:235
return() int(((double) *(font_tbl[cur_fnt].wtbl+(int)(*(font_tbl[cur_fnt].char_wi+(int)(ch - font_tbl[cur_fnt].char_f)% 256)))/(double)(1L<< 20)) *(double) font_tbl[cur_fnt].scale)
image_common_t common
image_type_t type
static int common(PROLOG_STATE *state, int tok)
Definition: xmlrole.c:1305
#define end(cp)
Definition: zic.c:71