Simple pressure sensitivity.

Mon Jun  8 22:09:07 1998  Owen Taylor  <otaylor@gtk.org>

	* app/airbrush.c: Simple pressure sensitivity.
This commit is contained in:
Owen Taylor 1998-06-09 02:06:33 +00:00 committed by Owen Taylor
parent 51b8deb9e5
commit 46d0250869
5 changed files with 28 additions and 4 deletions

View File

@ -1,3 +1,7 @@
Mon Jun 8 22:09:07 1998 Owen Taylor <otaylor@gtk.org>
* app/airbrush.c: Simple pressure sensitivity.
Mon Jun 8 17:47:37 PDT 1998 Manish Singh <yosh@gimp.org>
* app/menus.c: unref the itemfactories instead of destroying

View File

@ -236,6 +236,7 @@ airbrush_motion (PaintCore *paint_core,
GimpDrawable *drawable,
double pressure)
{
gint opacity;
GImage *gimage;
TempBuf * area;
unsigned char col[MAX_CHANNELS];
@ -258,9 +259,13 @@ airbrush_motion (PaintCore *paint_core,
color_pixels (temp_buf_data (area), col,
area->width * area->height, area->bytes);
opacity = pressure * (paint_core->curpressure / 0.5);
if (opacity > 255)
opacity = 255;
/* paste the newly painted area to the image */
paint_core_paste_canvas (paint_core, drawable,
(int) (pressure * 2.55),
opacity,
(int) (get_brush_opacity () * 255),
get_brush_paint_mode (),
SOFT, CONSTANT);

View File

@ -236,6 +236,7 @@ airbrush_motion (PaintCore *paint_core,
GimpDrawable *drawable,
double pressure)
{
gint opacity;
GImage *gimage;
TempBuf * area;
unsigned char col[MAX_CHANNELS];
@ -258,9 +259,13 @@ airbrush_motion (PaintCore *paint_core,
color_pixels (temp_buf_data (area), col,
area->width * area->height, area->bytes);
opacity = pressure * (paint_core->curpressure / 0.5);
if (opacity > 255)
opacity = 255;
/* paste the newly painted area to the image */
paint_core_paste_canvas (paint_core, drawable,
(int) (pressure * 2.55),
opacity,
(int) (get_brush_opacity () * 255),
get_brush_paint_mode (),
SOFT, CONSTANT);

View File

@ -236,6 +236,7 @@ airbrush_motion (PaintCore *paint_core,
GimpDrawable *drawable,
double pressure)
{
gint opacity;
GImage *gimage;
TempBuf * area;
unsigned char col[MAX_CHANNELS];
@ -258,9 +259,13 @@ airbrush_motion (PaintCore *paint_core,
color_pixels (temp_buf_data (area), col,
area->width * area->height, area->bytes);
opacity = pressure * (paint_core->curpressure / 0.5);
if (opacity > 255)
opacity = 255;
/* paste the newly painted area to the image */
paint_core_paste_canvas (paint_core, drawable,
(int) (pressure * 2.55),
opacity,
(int) (get_brush_opacity () * 255),
get_brush_paint_mode (),
SOFT, CONSTANT);

View File

@ -236,6 +236,7 @@ airbrush_motion (PaintCore *paint_core,
GimpDrawable *drawable,
double pressure)
{
gint opacity;
GImage *gimage;
TempBuf * area;
unsigned char col[MAX_CHANNELS];
@ -258,9 +259,13 @@ airbrush_motion (PaintCore *paint_core,
color_pixels (temp_buf_data (area), col,
area->width * area->height, area->bytes);
opacity = pressure * (paint_core->curpressure / 0.5);
if (opacity > 255)
opacity = 255;
/* paste the newly painted area to the image */
paint_core_paste_canvas (paint_core, drawable,
(int) (pressure * 2.55),
opacity,
(int) (get_brush_opacity () * 255),
get_brush_paint_mode (),
SOFT, CONSTANT);