~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to app/core/cpercep.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef __CPERCEP_H__
2
 
#define __CPERCEP_H__
3
 
/*
4
 
Copyright (C) 1997-2002 Adam D. Moss (the "Author").  All Rights Reserved.
5
 
 
6
 
Permission is hereby granted, free of charge, to any person obtaining a copy
7
 
of this software and associated documentation files (the "Software"), to deal
8
 
in the Software without restriction, including without limitation the rights
9
 
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
 
copies of the Software, and to permit persons to whom the Software is fur-
11
 
nished to do so, subject to the following conditions:
12
 
 
13
 
The above copyright notice and this permission notice shall be included in
14
 
all copies or substantial portions of the Software.
15
 
 
16
 
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
18
 
NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
19
 
AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20
 
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
21
 
NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
 
 
23
 
Except as contained in this notice, the name of the Author of the
24
 
Software shall not be used in advertising or otherwise to promote the sale,
25
 
use or other dealings in this Software without prior written authorization
26
 
from the Author.
27
 
*/
28
 
 
29
 
/*
30
 
  cpercep.c: The CPercep Functions v0.9: 2002-02-10
31
 
  Adam D. Moss: adam@gimp.org <http://www.foxbox.org/adam/code/cpercep/>
32
 
 
33
 
  TODO: document functions, rename erroneously-named arguments
34
 
*/
35
 
 
36
 
void
37
 
cpercep_init_conversions(void);
38
 
 
39
 
void
40
 
cpercep_rgb_to_space (double inr, double ing, double inb,
41
 
                      double* outr, double* outg, double* outb);
42
 
 
43
 
void
44
 
cpercep_space_to_rgb (double inr, double ing, double inb,
45
 
                      double* outr, double* outg, double* outb);
46
 
 
47
 
#if 0
48
 
/* This is in the header so that it can potentially be inlined. */
49
 
static const double
50
 
cpercep_distance_space (const double L1, const double a1, const double b1,
51
 
                        const double L2, const double a2, const double b2)
52
 
{
53
 
  const double Ld = L1 - L2;
54
 
  const double ad = a1 - a2;
55
 
  const double bd = b1 - b2;
56
 
  return (Ld*Ld + ad*ad + bd*bd);
57
 
}
58
 
#endif
59
 
 
60
 
 
61
 
/* EXPERIMENTAL */
62
 
#if 0
63
 
void
64
 
mix_colours (const double L1, const double a1, const double b1,
65
 
             const double L2, const double a2, const double b2,
66
 
             double *rtnL, double *rtna, double *rtnb,
67
 
             double mass1, double mass2);
68
 
/* util function */
69
 
const double
70
 
xscaler(const double start, const double end,
71
 
        const double me, const double him);
72
 
#define MF(L) ((L)<=0.0 ? 0.0 : 1.0)
73
 
#endif /* EXPERIMENTAL */
74
 
 
75
 
 
76
 
#endif /* __CPERCEP_H__ */