From 17c755dde40be7ff9e7db1606359dd84eeea5649 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 1 Dec 2012 19:01:27 -0800 Subject: [PATCH] Removed experimental structures. --- libguac/include/hash.h | 85 ------------------------------------------ 1 file changed, 85 deletions(-) diff --git a/libguac/include/hash.h b/libguac/include/hash.h index c17cc2b8..312a05f1 100644 --- a/libguac/include/hash.h +++ b/libguac/include/hash.h @@ -41,91 +41,6 @@ #include -/** - * A wrapper for a Cairo surface which allows fast image queries (linear time - * in the size of the query image). Given an arbitrary input image, the first - * occurence of that image within the contained surface can be found quickly. - */ -typedef struct guac_indexed_surface { - - /** - * The Cairo surface which is indexed. - */ - cairo_surface_t* surface; - -} guac_indexed_surface; - -typedef struct guac_indexed_surface_subimage { - - /** - * The indexed surface this subimage is a part of. - */ - guac_indexed_surface* surface; - - /** - * The X coordinate of the upper-left point of the rectangle - * of the subimage. - */ - int x; - - /** - * The Y coordinate of the upper-left point of the rectangle - * of the subimage. - */ - int y; - - /** - * The width of the subimage in pixels. - */ - int width; - - /** - * The height of the subimage in pixels. - */ - int height; - -} guac_indexed_surface_subimage; - -/** - * Creates a new indexed surface, using the given surface as the image data - * source. The given surface will be made searchable such that queries of - * images which are at least the given width and height can be resolved - * quickly. - * - * @param surface The Cairo surface to index. - * @param min_width The minimum image width to allow for queries. - * @param min_height The minimum image height to allow for queries. - * @return A newly allocated guac_indexed_surface. - */ -guac_indexed_surface* guac_indexed_surface_alloc(cairo_surface_t* surface, - int min_width, int min_height); - -/** - * Frees the given indexed surface. - * - * @param surface The guac_indexed_surface to free. - */ -void guac_indexed_surface_free(guac_indexed_surface* surface); - -/** - * Given an indexed surface and a query image, finds the rectangle of the - * subimage of the indexed surface containing exactly the query image (if - * any) and saves the result. - * - * @param surface The guac_indexed_surface to query. - * @param query The image to search for within the indexed surface. - * @param result A pointer to an already-allocated - * guac_indexed_surface_subimage which will be modified - * to contain the result if a result is found. - * @return Non-zero if the given query image was found within the indexed - * surface, in which case the result will be stored in the given - * guac_indexed_surface_subimage, or zero if the query image could - * not be found, in which case the given guac_indexed_surface_subimage - * will not be modified. - */ -int guac_indexed_surface_find(guac_indexed_surface* surface, - cairo_surface_t* query, guac_indexed_surface_subimage* result); - /** * Produces a 24-bit hash value from all pixels of the given surface. The * surface provided must be RGB or ARGB with each pixel stored in 32 bits.