mirror of https://github.com/GNOME/gimp.git
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:
parent
51b8deb9e5
commit
46d0250869
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue