Pixopedia Documentation

Print

5.1. Draw

Drawing action (menu entry: Actions->Draw)

This action performs drawing with selected brush and color scheme over image canvas using selected arithmetic/logic mode:

(image pixel = A; brush color = B)

Normal simple drawing, no arithmetic
Scaled simple scaled drawing; no arithmetic
Erase erase color (replace it with another color). Note: when image is transparent, alpha channel is erased
XOR A = A xor B
AND A = A and B
OR A = A or B
ADD A = A + B
SUB(A-B) A = A – B
MULT A = A * B
MULT norm A A = A * B/max(A)
MULT norm B A = A * B/max(B)
Higher A = max(A, B)
Lower A = min(A, B)
Mean A = (A + B)/2
MinMax A.max_channel = B.max_channel (if B.max_channel > A.max_channel); A.min_channel = B.min_channel (if B.min_channel < A.min_channel)
Random A = random(A, B)
A*intB + B*intA A = A*intensity(B) + B*intensity(A)
A*intA/intB A = A*intensity(A)/intensity(B)
A*intensityB A = A*intensity(B)
B*intensityA A = B*intensity(A)
A MOD B A = reminder(A/B)
A x B performs cross product between image pixel and brush RGB  vectors.
Burn linear A = (A + B) – 255
Sqrt(A^2 + B^2) A = sqrt(A^2 + B^2); Euclidean distance between A.channel and B.channel
AbsSub A = ABS(A-B)
Exclusion A = 127.0 – 2.0*(A – 127.0) * (B – 127.0)

As you may notice, normal drawing mode does not have any additional options, as this is simple straight forward drawing.

All other modes have additional options…all the same, except “erase” mode.

Erase mode has following additional options:

Erase options

  • Erase all colors: erase/replace all colors under the brush tip with  “replace color” value.
  • Erase matching color: erase/replace all colors that are equal to “matching color” value. By default, matching color is black. Click on matching color picker combo to change it or drag picked color from status/bottom bar.
  • Tolerance: related to matching color;  sets the tolerance value to matching color.
  • Replace color: picker combo; you can set any value desired or drag the color from similar item (brush color, picked colors, etc..).
  • DCP: dominant color percentage. Initially, nothing is  shown here. When “get dominant color” button is clicked it shows the percentage of dominant color of current image.
  • Get dominant color: calculates dominant color of image and sets the color value as “matching color”…well, I suppose so.

All other modes (except normal and erase) have following additional options:

Drawing options

  • Invert source: inverts the value of source (image)  before combining it with brush color (negative).
  • Bit shift: shifts source pixel color value left or right by given amount (-n => shift right , +n => shift left).
  • Scaling: you can re-scale each output color channel to new value. Initial scale used is [0, 255]. For example, you can re-scale red channel so that min value is 24 and max value is 128 => [0, 255] maps to [24, 128].

All those arithmetic/logic  operations with various options do not have too much sense with single color brush color scheme. However, when cloning brush or texture is used, you can achieve some nice effects.