Bug 247835

Summary: hairy brush paints predefined brushes four times and with weird colors
Product: [Applications] krita Reporter: Halla Rempt <halla>
Component: Brush enginesAssignee: LukasT <lukast.dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: settings

Description Halla Rempt 2010-08-14 10:52:27 UTC
Created attachment 50528 [details]
settings

When painting with the hairy brush, if you select one of the predefined brush tips you get very interesting results: it seems as if the tip is deformed, painted four times and with lots of color variation. See attachment
Comment 1 LukasT 2010-08-24 10:21:28 UTC
Confirmed!

The problem is that KisBrush provides image() and hairy brush uses directly that image. It is called preview but it is not preview for e.g. gbr brushes where it is used as base for the mip-mapping levels. It is not scaled and also the pixel format might be different that the code expects.

It will be fixed by rendering the status of the brush into paint device and then the shape of the hairy brush will be taken from the rendered image.
Comment 2 LukasT 2010-09-08 18:01:11 UTC
SVN commit 1173087 by lukast:

Fix painting with predefinded brushes.
Speedup in range 1.15 - 1.30, tested with benchmarks.

o Now it renders the dab and takes the bristles
  from it instead of using preview image.
o use const reference to avoid copying the QVector

BUG:247835

 M  +0 -1      CMakeLists.txt  
 D             brush_shape.cpp  
 D             brush_shape.h  
 M  +40 -23    hairy_brush.cpp  
 M  +5 -7      hairy_brush.h  
 M  +17 -44    kis_hairy_paintop.cpp  
 M  +1 -3      kis_hairy_paintop.h  
 M  +1 -1      trajectory.cpp  
 M  +2 -2      trajectory.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1173087