File: ppeffect_unsharpmask.cpp

package info (click to toggle)
photoprint 0.3.8b-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,396 kB
  • ctags: 3,472
  • sloc: cpp: 25,818; sh: 9,132; ansic: 4,778; makefile: 491; sed: 16
file content (70 lines) | stat: -rw-r--r-- 1,145 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#include <iostream>
#include <stdlib.h>
#include <string.h>

#include "imagesource_unsharpmask.h"
#include "layout.h"

#include "ppeffect_unsharpmask.h"

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "gettext.h"

#define _(x) gettext(x)
#define N_(x) gettext_noop(x)


const char *PPEffect_UnsharpMask::ID="UnsharpMask";
const char *PPEffect_UnsharpMask::GetID()
{
	return(ID);
}
const char *PPEffect_UnsharpMask::Name=_("Sharpen");
const char *PPEffect_UnsharpMask::GetName()
{
	return(Name);
}


PPEffect_UnsharpMask::PPEffect_UnsharpMask(PPEffectHeader &header,int priority,enum PPEFFECT_STAGE stage)
	:	PPEffect(header,priority,stage), radius(3.0), amount(1.5)
{
}


PPEffect_UnsharpMask::~PPEffect_UnsharpMask()
{
}


ImageSource *PPEffect_UnsharpMask::Apply(ImageSource *source)
{
	return(new ImageSource_UnsharpMask(source,radius,amount));
}


float PPEffect_UnsharpMask::GetRadius()
{
	return(radius);
}


void PPEffect_UnsharpMask::SetRadius(float radius)
{
	this->radius=radius;
}


float PPEffect_UnsharpMask::GetAmount()
{
	return(amount);
}


void PPEffect_UnsharpMask::SetAmount(float amount)
{
	this->amount=amount;
}