Repository navigation
Part of gap 2: Effect › Pixelate (Color Halftone, Crystallize, Mezzotint, Pointillize) - #930
Merged
Merged
Conversation
…int, Pointillize) Four Photoshop-style raster effects on the pixel-filter pipeline (vectorcraft_effects::pixel::pixelate), under a new Effect › Pixelate submenu between Blur and Sharpen in the Raster Effects section: - Color Halftone (maxRadius 4..127, default 8; channel1..channel4 screen angles -360..360, defaults 108/162/90/45): each colour channel is screened at its angle in square cells sized so a dot of Max. Radius fills one; each cell's dot covers the share of the cell that is the channel's coverage-weighted mean there (white stays white, black black). RGB documents screen R, G, B (channels 1 to 3); CMYK documents screen C, M, Y, K inks (channels 1 to 4), also when they are drawn ink plane by ink plane (the K plane uses channel 4). - Crystallize (cellSize 3..300, default 10): every pixel takes the colour at the nearest of one jittered point per cell (exact Voronoi over a 5 x 5 neighbourhood, pruned by distance). - Mezzotint (type: Fine/Medium/Grainy/Coarse Dots, Short/Medium/Long Lines, Short/Medium/Long Strokes; default Fine Dots; a dropdown in the dialog): each channel is turned fully on or off against its own random threshold pattern, so the object becomes pure colours. - Pointillize (cellSize 3..300, default 5): one dot of random size per cell at a jittered point, coloured by the softened object there and as opaque as the object at its centre, stacked in random order over a white canvas where the object is. Lengths are in points (Scale Strokes & Effects scales them) and every pattern lies in document space around the object's centre, so the result is the same at any zoom or raster resolution, moves with the object, and is identical on every redraw (hash noise of the pattern's cell indices, no state). Work per pixel is bounded whatever the parameters, which are clamped to their ranges and finite-checked; the halftone's cell grid is capped by the raster's size and a screen finer than 3 pixels leaves the image as it is (its average). PixelSpace gains `channels` so the renderer tells the filters what the channels hold. Catalogue rows with parameter docs, outsets and reaches for cropping, menu entries, dialog labels (Max. Radius, Channel 1-4, Cell Size), the Mezzotint Type dropdown, translations, and tests: parameters and clamping, tone and coverage, CMYK inks, polygon crystals, pure-colour mezzotints with ten distinct patterns, dots on a white canvas, the same result at twice the resolution and when moved, the canvas, PDF and SVG through the engine, the command sweep with junk parameters, the dialogs and the menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of ROADMAP gap 2 (Photoshop-style raster effects).
Adds Effect › Pixelate to the pixel-filter pipeline, with the parameters, ranges and defaults Illustrator's effects summary documents:
pixelate.colorHalftone): Max. Radius 4–127 (8) and Channel 1–4 screen angles −360–360 (108, 162, 90, 45). Each channel is screened at its angle in square cells, each dot covering the share of its cell equal to the channel's mean there, so white stays white and black stays black. RGB documents screen R, G and B; CMYK documents screen C, M, Y and K, also when drawn ink plane by ink plane.pixelate.crystallize): Cell Size 3–300 (10). Polygons of solid colour around one random point per cell.pixelate.mezzotint): Type (Fine, Medium, Grainy and Coarse Dots; Short, Medium and Long Lines; Short, Medium and Long Strokes) as a dropdown. Each colour channel is turned fully on or off against its own pattern.pixelate.pointillize): Cell Size 3–300 (5). A dot of random size and stacking order per cell, coloured by the softened object, on a white canvas where the object is.Patterns are laid out in document space around the object, so a result is the same at any zoom or export resolution, moves with the object and is identical on every redraw. Parameters are clamped and checked for finite values, and the work per pixel is bounded (0.2–0.7 s on a 2000 × 2000 raster, within the existing filters' range).
PixelSpacegains achannelsfield that the renderer sets from the ink plane and the document's colour mode.Menu (Raster Effects section, between Blur and Sharpen), effect dialogs (the Mezzotint Type dropdown, Max. Radius, Channel 1–4 and Cell Size labels), translations in every catalogue, and ROADMAP (raster effects 25% → 28%, ~47 filters left).
References: https://helpx.adobe.com/illustrator/using/summary-effects.html, https://helpx.adobe.com/photoshop/using/filter-effects-reference.html
Tested:
cargo xtask ci(all 7 steps).tests_rasterfilterscovers the four on the canvas, multithreaded, in PDF and SVG;command_sweepsends them junk parameters.🤖 Generated with Claude Code