/* Number of bits of precision used for alpha. */ #define CAIRO_SPANS_UNIT_COVERAGE_BITS 8 #define CAIRO_SPANS_UNIT_COVERAGE ((1 << CAIRO_SPANS_UNIT_COVERAGE_BITS)-1)
/* A structure representing an open-ended horizontal span of constant
* pixel coverage. */ typedefstruct _cairo_half_open_span {
int32_t x; /* The inclusive x-coordinate of the start of the span. */
uint8_t coverage; /* The pixel coverage for the pixels to the right. */
uint8_t inverse; /* between regular mask and clip */
} cairo_half_open_span_t;
/* Span renderer interface. Instances of renderers are provided by
* surfaces if they want to composite spans instead of trapezoids. */ typedefstruct _cairo_span_renderer cairo_span_renderer_t; struct _cairo_span_renderer { /* Private status variable. */
cairo_status_t status;
/* Called to destroy the renderer. */
cairo_destroy_func_t destroy;
/* Render the spans on row y of the destination by whatever compositing
* method is required. */
cairo_status_t
(*render_rows) (void *abstract_renderer, int y, int height, const cairo_half_open_span_t *coverages, unsigned num_coverages);
/* Called after all rows have been rendered to perform whatever *finalrenderingstepisrequired.Thisfunctioniscalledjust
* once before the renderer is destroyed. */
cairo_status_t (*finish) (void *abstract_renderer);
};
/* Generates coverage spans for rows for the added edges and calls *therendererfunctionforeachrow.Aftergeneratingspansthe
* only valid thing to do with the converter is to destroy it. */
cairo_status_t (*generate) (void *abstract_converter,
cairo_span_renderer_t *renderer);
/* Private status. Read with _cairo_scan_converter_status(). */
cairo_status_t status;
};
/* Scan converter constructors. */
cairo_private cairo_scan_converter_t *
_cairo_tor_scan_converter_create (int xmin, int ymin, int xmax, int ymax,
cairo_fill_rule_t fill_rule,
cairo_antialias_t antialias);
cairo_private cairo_status_t
_cairo_tor_scan_converter_add_polygon (void *converter, const cairo_polygon_t *polygon);
cairo_private cairo_scan_converter_t *
_cairo_tor22_scan_converter_create (int xmin, int ymin, int xmax, int ymax,
cairo_fill_rule_t fill_rule,
cairo_antialias_t antialias);
cairo_private cairo_status_t
_cairo_tor22_scan_converter_add_polygon (void *converter, const cairo_polygon_t *polygon);
cairo_private cairo_scan_converter_t *
_cairo_mono_scan_converter_create (int xmin, int ymin, int xmax, int ymax,
cairo_fill_rule_t fill_rule);
cairo_private cairo_status_t
_cairo_mono_scan_converter_add_polygon (void *converter, const cairo_polygon_t *polygon);
/* Set the renderer into an error state. This sets all the method *pointersexcept->destroy()oftherenderertono-op
* implementations that just return the error status. */
cairo_private cairo_status_t
_cairo_span_renderer_set_error (void *abstract_renderer,
cairo_status_t error);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.