Skip to content

Commit 28a6210

Browse files
committed
Updateing stroke screenshot and adding some docu
1 parent 7f03e16 commit 28a6210

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,17 @@ PImage processedImage = Glitch.apply(image, intensity, scanlineheight);
237237
#### Strokes image
238238
![alt lookup-table](https://github.com/Milchreis/processing-imageprocessing/blob/master/img/strokes.png?raw=true)
239239
```java
240-
// gridSize is positive and the area for compound pixels
241-
// lineLength is positive and the length in pixels for each line
240+
// gridSize
241+
// lineLength
242242
PImage processedImage = Strokes.apply(image, gridSize, lineLength);
243+
PImage processedImage = Strokes.apply(image,
244+
gridSize, // is positive and the area for compound pixels
245+
lineLength, // is positive and the length in pixels for each line
246+
lineWeight, // is positive and the weight of each line in pixel
247+
linesPerGrid, // the number of lines per grid
248+
lineIntensity, // alpha value for each line between 0 and 255
249+
inColor, // true for colors else black and white
250+
backgroundColor); // color for the background
243251
```
244252

245253
#### Dithering

examples/StrokesExample/StrokesExample.pde

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,16 @@ void draw() {
2424

2525
int gridSize = (int) map(mouseX, 0, width, 4, 20);
2626
int lineLength = (int) map(mouseY, 0, height, 1, 20);
27+
int lineWeight = 2;
28+
int linesPerGrid = 4;
29+
int lineIntensity = 220;
30+
boolean inColor = true;
31+
color backgroundColor = 255;
32+
33+
PImage processedImage = Strokes.apply(image,
34+
gridSize, lineLength, lineWeight,
35+
linesPerGrid, lineIntensity, inColor, backgroundColor);
2736

28-
PImage processedImage = Strokes.apply(image, gridSize, lineLength);
2937
image(processedImage, 0, 0);
3038
}
3139
}

img/strokes.png

303 KB
Loading

0 commit comments

Comments
 (0)