~ubuntu-branches/ubuntu/maverick/grafx2/maverick

« back to all changes in this revision

Viewing changes to src/brush.h

  • Committer: Bazaar Package Importer
  • Author(s): Gürkan Sengün
  • Date: 2010-03-22 12:07:47 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100322120747-g0jel6vf6mjkc53s
Tags: 2.2-1
* New upstream version, fixes FTBFS with binutils-gold. (Closes: #554742)
* Bump standards version to 3.8.4.
* debian/control: Add liblua5.1-0-dev and pkg-config to build depends.
* debian/rules: Drop dh_desktop call.
* debian/copyright: Update years.
* Switch to dpkg-source format version 3.0 (quilt).
* debian/watch: Added.
* Added patch to fix spelling errors in source code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* vim:expandtab:ts=2 sw=2:
 
2
*/
 
3
/*  Grafx2 - The Ultimate 256-color bitmap paint program
 
4
 
 
5
    Copyright 2007-2008 Adrien Destugues
 
6
    Copyright 1996-2001 Sunset Design (Guillaume Dorme & Karl Maritaud)
 
7
 
 
8
    Grafx2 is free software; you can redistribute it and/or
 
9
    modify it under the terms of the GNU General Public License
 
10
    as published by the Free Software Foundation; version 2
 
11
    of the License.
 
12
 
 
13
    Grafx2 is distributed in the hope that it will be useful,
 
14
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
    GNU General Public License for more details.
 
17
 
 
18
    You should have received a copy of the GNU General Public License
 
19
    along with Grafx2; if not, see <http://www.gnu.org/licenses/>
 
20
*/
 
21
 
 
22
//////////////////////////////////////////////////////////////////////////////
 
23
///@file brush.h
 
24
/// Actions on the brush.
 
25
//////////////////////////////////////////////////////////////////////////////
 
26
 
 
27
#ifndef __BRUSH_H_
 
28
#define __BRUSH_H_
 
29
 
 
30
#include "struct.h"
 
31
 
 
32
/*!
 
33
    Gets the brush from the picture.
 
34
    @param start_x left edge coordinate in the picture
 
35
    @param start_y upper edge coordinate in the picture
 
36
    @param end_x right edge coordinate in the picture
 
37
    @param end_y bottom edge coordinate in the picture
 
38
    @param clear If 1, the area is also cleared from the picture.
 
39
*/
 
40
void Capture_brush(short start_x,short start_y,short end_x,short end_y,short clear);
 
41
 
 
42
/*!
 
43
  Rotates the brush to the right.
 
44
*/
 
45
void Rotate_90_deg(void);
 
46
 
 
47
/*!
 
48
    Stretch the brush to fit the given rectangle.
 
49
*/
 
50
void Stretch_brush(short x1, short y1, short x2, short y2);
 
51
 
 
52
/*!
 
53
    Stretch the brush to fit the given rectangle.
 
54
    Uses fast approximation for the preview while drawing the rectangle on screen.
 
55
*/
 
56
void Stretch_brush_preview(short x1, short y1, short x2, short y2);
 
57
 
 
58
/*!
 
59
    Rotates the brush to the right from the given angle.
 
60
*/
 
61
void Rotate_brush(float angle);
 
62
 
 
63
/*!
 
64
    Stretch the brush to fit the given rectangle.
 
65
    Uses fast approximation for the preview while changing the angle.
 
66
*/
 
67
void Rotate_brush_preview(float angle);
 
68
 
 
69
/*!
 
70
    Remap the brush palette to the nearest color in the picture one.
 
71
    Used when switching to the spare page.
 
72
*/
 
73
 
 
74
/*!
 
75
    Distort the brush on the screen.
 
76
*/
 
77
void Distort_brush_preview(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4);
 
78
 
 
79
/*!
 
80
    Replace the brush by a distorted version of itself.
 
81
*/
 
82
void Distort_brush(short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4);
 
83
 
 
84
 
 
85
void Remap_brush(void);
 
86
 
 
87
/*!
 
88
    Get color indexes used by the brush.
 
89
*/
 
90
void Get_colors_from_brush(void);
 
91
 
 
92
/*!
 
93
    Outline the brush, add 1 foreground-colored pixel on the edges.
 
94
    Edges are detected considering the backcolor as transparent.
 
95
*/
 
96
void Outline_brush(void);
 
97
 
 
98
/*!
 
99
    Nibble the brush, remove 1 pixel on the edges and make it transparent (ie filled with back color).
 
100
    Edges are detected considering the backcolor as transparent.
 
101
*/
 
102
void Nibble_brush(void);
 
103
 
 
104
/*!
 
105
    Get brush from picture according to a freehand form.
 
106
    @param vertices number of points in the freehand form
 
107
    @param points array of points coordinates
 
108
    @param clear If set to 1, the captured area is also cleared from the picture.
 
109
*/
 
110
void Capture_brush_with_lasso(int vertices, short * points,short clear);
 
111
 
 
112
 
 
113
///
 
114
/// Changes the Brush size, discarding its previous content.
 
115
/// @return 0 OK, 1 Failed
 
116
byte Realloc_brush(word new_brush_width, word new_brush_height);
 
117
 
 
118
 
 
119
 
 
120
#endif