mirror of https://github.com/GNOME/gimp.git
app: Fix layer expansion while painting with symmetry enabled
This commit is contained in:
parent
e33618a650
commit
5191c17fb7
|
@ -816,6 +816,7 @@ gimp_brush_core_get_paint_buffer (GimpPaintCore *paint_core,
|
|||
gint drawable_width, drawable_height;
|
||||
gint brush_width, brush_height;
|
||||
gint offset_change_x, offset_change_y;
|
||||
GimpCoords new_coords;
|
||||
|
||||
gimp_brush_transform_size (core->brush,
|
||||
core->scale, core->aspect_ratio,
|
||||
|
@ -845,6 +846,11 @@ gimp_brush_core_get_paint_buffer (GimpPaintCore *paint_core,
|
|||
{
|
||||
x += offset_change_x;
|
||||
y += offset_change_y;
|
||||
|
||||
new_coords = *coords;
|
||||
new_coords.x = coords->x + offset_change_x;
|
||||
new_coords.y = coords->y + offset_change_y;
|
||||
gimp_symmetry_set_origin (paint_core->sym, drawable, &new_coords);
|
||||
}
|
||||
|
||||
drawable_width = gimp_item_get_width (GIMP_ITEM (drawable));
|
||||
|
|
|
@ -266,6 +266,11 @@ gimp_ink_get_paint_buffer (GimpPaintCore *paint_core,
|
|||
x += SUBSAMPLE * offset_change_x;
|
||||
y += SUBSAMPLE * offset_change_y;
|
||||
|
||||
new_coords = *coords;
|
||||
new_coords.x = coords->x + offset_change_x;
|
||||
new_coords.y = coords->y + offset_change_y;
|
||||
gimp_symmetry_set_origin (paint_core->sym, drawable, &new_coords);
|
||||
|
||||
for (iter = ink->last_blobs; iter; iter = g_list_next (iter))
|
||||
gimp_blob_move (iter->data,
|
||||
SUBSAMPLE * offset_change_x,
|
||||
|
@ -357,6 +362,7 @@ gimp_ink_motion (GimpPaintCore *paint_core,
|
|||
coords.x -= off_x;
|
||||
coords.y -= off_y;
|
||||
gimp_symmetry_set_origin (sym, drawable, &coords);
|
||||
paint_core->sym = sym;
|
||||
|
||||
n_strokes = gimp_symmetry_get_size (sym);
|
||||
|
||||
|
|
|
@ -249,6 +249,7 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
|
|||
coords.x -= off_x;
|
||||
coords.y -= off_y;
|
||||
gimp_symmetry_set_origin (sym, drawable, &coords);
|
||||
paint_core->sym = sym;
|
||||
|
||||
/* Some settings are based on the original stroke. */
|
||||
opacity *= gimp_dynamics_get_linear_value (dynamics,
|
||||
|
@ -310,11 +311,7 @@ _gimp_paintbrush_motion (GimpPaintCore *paint_core,
|
|||
&paint_buffer_y,
|
||||
&paint_width,
|
||||
&paint_height);
|
||||
|
||||
gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y);
|
||||
coords = *(gimp_symmetry_get_coords (sym, i));
|
||||
coords.x -= off_x;
|
||||
coords.y -= off_y;
|
||||
coords = *(gimp_symmetry_get_coords (sym, i));
|
||||
|
||||
if (! paint_buffer)
|
||||
continue;
|
||||
|
|
|
@ -72,6 +72,8 @@ struct _GimpPaintCore
|
|||
GHashTable *applicators;
|
||||
|
||||
GArray *stroke_buffer;
|
||||
|
||||
GimpSymmetry *sym;
|
||||
};
|
||||
|
||||
struct _GimpPaintCoreClass
|
||||
|
|
|
@ -402,6 +402,7 @@ gimp_smudge_motion (GimpPaintCore *paint_core,
|
|||
coords.x -= off_x;
|
||||
coords.y -= off_y;
|
||||
gimp_symmetry_set_origin (sym, drawable, &coords);
|
||||
paint_core->sym = sym;
|
||||
|
||||
opacity = gimp_dynamics_get_linear_value (dynamics,
|
||||
GIMP_DYNAMICS_OUTPUT_OPACITY,
|
||||
|
|
|
@ -343,6 +343,7 @@ gimp_source_core_motion (GimpSourceCore *source_core,
|
|||
coords.x -= off_x;
|
||||
coords.y -= off_y;
|
||||
gimp_symmetry_set_origin (sym, drawable, &coords);
|
||||
paint_core->sym = sym;
|
||||
|
||||
/* Some settings are based on the original stroke. */
|
||||
opacity = gimp_dynamics_get_linear_value (dynamics,
|
||||
|
|
Loading…
Reference in New Issue