Fix #25933: Drag Dog stroke method uses Jitter if set for other stroke method, but no jitter available.

Manually disable jitter usage for anchored and drag dot brush stroke metdhods.
Jitter slider is hidden in UI for this strokes so users can't set it to 0 by hand
and even if this slider would be visible in UI jitter gives wierd result for
this stroke methods.
This commit is contained in:
Sergey Sharybin
2011-02-04 16:10:30 +00:00
parent 4e8a8d1e8f
commit 4925581820

View File

@@ -907,7 +907,13 @@ static void brush_apply_pressure(BrushPainter *painter, Brush *brush, float pres
void brush_jitter_pos(Brush *brush, float *pos, float *jitterpos)
{
if(brush->jitter){
int use_jitter= brush->jitter != 0;
/* jitter-ed brush gives wierd and unpredictable result for this
kinds of stroke, so manyally disable jitter usage (sergey) */
use_jitter&= (brush->flag & (BRUSH_RESTORE_MESH|BRUSH_ANCHORED)) == 0;
if(use_jitter){
float rand_pos[2];
const int radius= brush_size(brush);
const int diameter= 2*radius;