Ok, try to at least have eraser work for non-xinput devices

This commit is contained in:
Manish Vachharajani 1998-06-23 03:41:59 +00:00
parent 8403ce3308
commit e6a03c8573
5 changed files with 12 additions and 8 deletions

View File

@ -1,3 +1,7 @@
Mon Jun 22 22:57:00 EDT 1998 Manish Vachharajani <mvachhar@vger.rutgers.edu>
* app/eraser.c: Ack, try to get pressure sensitivity right this time.
Mon Jun 22 22:57:00 EDT 1998 Manish Vachharajani <mvachhar@vger.rutgers.edu> Mon Jun 22 22:57:00 EDT 1998 Manish Vachharajani <mvachhar@vger.rutgers.edu>
* app/eraser.c: Added support for pressure sensitive eraser * app/eraser.c: Added support for pressure sensitive eraser

View File

@ -179,8 +179,8 @@ eraser_motion (PaintCore *paint_core, GimpDrawable *drawable, gboolean hard, gbo
/* color the pixels */ /* color the pixels */
color_pixels (temp_buf_data (area), col, color_pixels (temp_buf_data (area), col,
area->width * area->height, area->bytes); area->width * area->height, area->bytes);
opacity = OPAQUE_OPACITY * (paint_core->curpressure / 0.5); opacity = 255 * get_brush_opacity() * (paint_core->curpressure / 0.5);
if(opacity > 255) opacity=255; if(opacity > OPAQUE_OPACITY) opacity=OPAQUE_OPACITY;
/* paste the newly painted canvas to the gimage which is being worked on */ /* paste the newly painted canvas to the gimage which is being worked on */
paint_core_paste_canvas (paint_core, drawable, opacity, paint_core_paste_canvas (paint_core, drawable, opacity,
(int) (get_brush_opacity () * 255), (int) (get_brush_opacity () * 255),

View File

@ -179,8 +179,8 @@ eraser_motion (PaintCore *paint_core, GimpDrawable *drawable, gboolean hard, gbo
/* color the pixels */ /* color the pixels */
color_pixels (temp_buf_data (area), col, color_pixels (temp_buf_data (area), col,
area->width * area->height, area->bytes); area->width * area->height, area->bytes);
opacity = OPAQUE_OPACITY * (paint_core->curpressure / 0.5); opacity = 255 * get_brush_opacity() * (paint_core->curpressure / 0.5);
if(opacity > 255) opacity=255; if(opacity > OPAQUE_OPACITY) opacity=OPAQUE_OPACITY;
/* paste the newly painted canvas to the gimage which is being worked on */ /* paste the newly painted canvas to the gimage which is being worked on */
paint_core_paste_canvas (paint_core, drawable, opacity, paint_core_paste_canvas (paint_core, drawable, opacity,
(int) (get_brush_opacity () * 255), (int) (get_brush_opacity () * 255),

View File

@ -179,8 +179,8 @@ eraser_motion (PaintCore *paint_core, GimpDrawable *drawable, gboolean hard, gbo
/* color the pixels */ /* color the pixels */
color_pixels (temp_buf_data (area), col, color_pixels (temp_buf_data (area), col,
area->width * area->height, area->bytes); area->width * area->height, area->bytes);
opacity = OPAQUE_OPACITY * (paint_core->curpressure / 0.5); opacity = 255 * get_brush_opacity() * (paint_core->curpressure / 0.5);
if(opacity > 255) opacity=255; if(opacity > OPAQUE_OPACITY) opacity=OPAQUE_OPACITY;
/* paste the newly painted canvas to the gimage which is being worked on */ /* paste the newly painted canvas to the gimage which is being worked on */
paint_core_paste_canvas (paint_core, drawable, opacity, paint_core_paste_canvas (paint_core, drawable, opacity,
(int) (get_brush_opacity () * 255), (int) (get_brush_opacity () * 255),

View File

@ -179,8 +179,8 @@ eraser_motion (PaintCore *paint_core, GimpDrawable *drawable, gboolean hard, gbo
/* color the pixels */ /* color the pixels */
color_pixels (temp_buf_data (area), col, color_pixels (temp_buf_data (area), col,
area->width * area->height, area->bytes); area->width * area->height, area->bytes);
opacity = OPAQUE_OPACITY * (paint_core->curpressure / 0.5); opacity = 255 * get_brush_opacity() * (paint_core->curpressure / 0.5);
if(opacity > 255) opacity=255; if(opacity > OPAQUE_OPACITY) opacity=OPAQUE_OPACITY;
/* paste the newly painted canvas to the gimage which is being worked on */ /* paste the newly painted canvas to the gimage which is being worked on */
paint_core_paste_canvas (paint_core, drawable, opacity, paint_core_paste_canvas (paint_core, drawable, opacity,
(int) (get_brush_opacity () * 255), (int) (get_brush_opacity () * 255),