CImg icon indicating copy to clipboard operation
CImg copied to clipboard

unsigned integer pattern=~0 drawing pattern

Open pwplus7 opened this issue 5 years ago • 2 comments

These words appear in numerous places in the Cimg PDF reference document andt is defined as an integer whose bits determine a drawing pattern ... But no where is it specified what happens when bit(n) of this integer set to 1 or 0

pwplus7 avatar Aug 18 '20 19:08 pwplus7

The pattern parameter has always the same meaning. It's a 32bits integer (unsigned int) whose bits define the pattern of the drawing.

  • If all bits are set to 1, then the line is entirely filled (which corresponds to ~0U or (unsigned int)-1).
  • For a pattern equal to 0xAAAAAAAA, you have the following binary pattern 10101010101010101010101010101010 which draws a line where 1 px/2 is set. etc.

dtschump avatar Sep 02 '20 08:09 dtschump