2017-04-25 14:41:48 +02:00
|
|
|
/*
|
|
|
|
|
* maxrect.h --
|
|
|
|
|
*
|
|
|
|
|
* Definitions needed for finding maximum-area rectangles
|
|
|
|
|
*
|
2020-05-23 23:13:14 +02:00
|
|
|
* *********************************************************************
|
|
|
|
|
* * Copyright (C) 1985, 1990 Regents of the University of California. *
|
|
|
|
|
* * Permission to use, copy, modify, and distribute this *
|
|
|
|
|
* * software and its documentation for any purpose and without *
|
|
|
|
|
* * fee is hereby granted, provided that the above copyright *
|
|
|
|
|
* * notice appear in all copies. The University of California *
|
|
|
|
|
* * makes no representations about the suitability of this *
|
|
|
|
|
* * software for any purpose. It is provided "as is" without *
|
|
|
|
|
* * express or implied warranty. Export of this software outside *
|
|
|
|
|
* * of the United States of America may require an export license. *
|
2017-04-25 14:41:48 +02:00
|
|
|
* *********************************************************************
|
|
|
|
|
*
|
|
|
|
|
* Needs to include: magic.h database.h
|
|
|
|
|
*
|
|
|
|
|
* rcsid $Header: /usr/cvsroot/magic-8.0/utils/maxrect.h,v 1.1 2008/12/04 16:21:44 tim Exp $
|
|
|
|
|
*/
|
|
|
|
|
|
2024-10-16 08:38:41 +02:00
|
|
|
#ifndef _MAGIC__UTILS__MAXRECT_H
|
|
|
|
|
#define _MAGIC__UTILS__MAXRECT_H
|
2017-04-25 14:41:48 +02:00
|
|
|
|
|
|
|
|
#include "database/database.h"
|
|
|
|
|
|
|
|
|
|
/* Data structure to keep a record of multiple rectangular regions,
|
|
|
|
|
* used by the widespacing rule
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
Rect *rlist;
|
|
|
|
|
Rect *swap;
|
|
|
|
|
int entries;
|
|
|
|
|
int maxdist;
|
|
|
|
|
int listdepth;
|
|
|
|
|
ClientData match;
|
|
|
|
|
} MaxRectsData;
|
|
|
|
|
|
|
|
|
|
extern MaxRectsData *genCanonicalMaxwidth();
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Exported procedures
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
extern Rect *FindMaxRectangle();
|
|
|
|
|
extern Rect *FindMaxRectangle2();
|
|
|
|
|
extern int FindMaxRects();
|
|
|
|
|
|
2024-10-16 08:38:41 +02:00
|
|
|
#endif /* _MAGIC__UTILS__MAXRECT_H */
|