The Pencil Tool works in a similar way as the brush tool, but with hard edges.
The leftmost item in the options bar opens a panel which allows you to select and edit your brush. Expand the "Advanced" section to change the brush's parameters.
The "Mode" box controls how newly applied colors will be mixed with the previous layer contents.
- "Normal" simply replaces the background colors with the foreground color.
- "Multiply" behaves as if the light would be passing through two layers of transparent paint (or two color filters on top of each other).
- Many more blending modes are available...
"Opacity" controls how much existing colors will be changed. 100% completely replaces existing colors. 0% doesn't affect the background at all.
To draw straight lines, click at the image, then hold shift and click again at another location.