Removed experimental structures.

This commit is contained in:
Michael Jumper 2012-12-01 19:01:27 -08:00
parent 825e3da0a2
commit 17c755dde4

View File

@ -41,91 +41,6 @@
#include <cairo/cairo.h> #include <cairo/cairo.h>
/**
* 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 * 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. * surface provided must be RGB or ARGB with each pixel stored in 32 bits.