~ubuntu-branches/ubuntu/breezy/gimp/breezy

« back to all changes in this revision

Viewing changes to app/base/boundary.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2005-10-04 19:04:46 UTC
  • Revision ID: james.westby@ubuntu.com-20051004190446-ukh32kwk56s4sjhu
Tags: upstream-2.2.8
ImportĀ upstreamĀ versionĀ 2.2.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* The GIMP -- an image manipulation program
 
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; either version 2 of the License, or
 
7
 * (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
17
 */
 
18
 
 
19
#ifndef  __BOUNDARY_H__
 
20
#define  __BOUNDARY_H__
 
21
 
 
22
 
 
23
/* half intensity for mask */
 
24
#define HALF_WAY 127
 
25
 
 
26
 
 
27
typedef enum
 
28
{
 
29
  WithinBounds,
 
30
  IgnoreBounds
 
31
} BoundaryType;
 
32
 
 
33
 
 
34
struct _BoundSeg
 
35
{
 
36
  gint     x1;
 
37
  gint     y1;
 
38
  gint     x2;
 
39
  gint     y2;
 
40
  guint    open : 1;
 
41
  guint    visited : 1;
 
42
};
 
43
 
 
44
 
 
45
BoundSeg * find_mask_boundary (PixelRegion    *maskPR,
 
46
                               gint           *num_elems,
 
47
                               BoundaryType    type,
 
48
                               gint            x1,
 
49
                               gint            y1,
 
50
                               gint            x2,
 
51
                               gint            y2,
 
52
                               guchar          threshold);
 
53
BoundSeg * sort_boundary      (const BoundSeg *segs,
 
54
                               gint            num_segs,
 
55
                               gint           *num_groups);
 
56
BoundSeg * simplify_boundary  (BoundSeg       *stroke_segs,
 
57
                               gint            num_groups,
 
58
                               gint           *num_segs);
 
59
 
 
60
 
 
61
 
 
62
#endif  /*  __BOUNDARY_H__  */