~ubuntu-branches/ubuntu/breezy/koffice/breezy-security

« back to all changes in this revision

Viewing changes to krita/doc/brush.txt

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-10-11 14:49:50 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051011144950-lwpngbifzp8nk0ds
Tags: 1:1.4.1-0ubuntu7
* SECURITY UPDATE: fix heap based buffer overflow in the RTF importer of KWord
* Opening specially crafted RTF files in KWord can cause
  execution of abitrary code.
* Add kubuntu_01_rtfimport_heap_overflow.diff
* References:
  CAN-2005-2971
  CESA-2005-005
  http://www.koffice.org/security/advisory-20051011-1.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Painting with brushes
 
2
 
 
3
:.,I don't know anything, nada, zilch, noppes about writing paint applications. So
 
4
when I started working on Krita, I felt I needed examples. I used the following
 
5
sources:
 
6
 
 
7
* The old Krita brush code (http://webcvs.kde.org/cgi-bin/cvsweb.cgi/koffice/krita/tools/kis_tool_brush.cc?rev=1.58&content-type=text/x-cvsweb-markup)
 
8
* Peter Jodda's Perico (http://software.jodda.de/perico.html)
 
9
* The source of the Gimp (both current and 0.99.11 -- the oldest version I could find) (http://www.gimp.org)
 
10
* David Hodson's article on Gimp brushes (http://members.ozemail.com.au/~hodsond/gimpbrush.html)
 
11
* Raph Levien's article on Gimp brushes (http://www.levien.com/gimp/brush-arch.html)
 
12
 
 
13
Krita uses the gimp's brush file formats: .gbr and .gih, for singe
 
14
and pipeline brushes, respectively. These brushes contain one or more
 
15
grayscale or rgba images. If the image is grayscale, the gray image is
 
16
intended to be used as an alpha mask: each gray level corresponds to
 
17
a certain alpha level, and when painting the current painting colour
 
18
is composited in the image with this level as its alpha component. The
 
19
image brushes should be masked -- i.e., these are coloured images placed
 
20
on a white background. The white background should be made transparent,
 
21
and then the brush image can be composited onto our image.
 
22
 
 
23
This is currently only half supported: I make masks of everything,
 
24
partly because I like that better, partly because until very recently
 
25
there was no way of making out the difference between gray and rgb
 
26
brushes because KisBrush didn't remember that bit of data.
 
27
 
 
28
Making the initial mask of a brush is however by now pretty well done; the next
 
29
problem is painting with those masks.
 
30
 
 
31
Here we have two situations, one easy, one difficult. The easy one is the single
 
32
mouse click. If the user clicks or taps with his stylus, we can composite the 
 
33
mask or the image at the pixel position of the mouse click.
 
34
 
 
35
The difficult situation is drawing a line. This line needs to be antialiased.
 
36