BrushCue 1.4.20 builds on the painter work from 1.4.15. In 1.4.15 you could take a painter apart and read each painted illustration. Now you can change those illustrations and put them back. Blends also get simpler: they take two arguments instead of three, and moving a layer is done with transform. Scripts can list the files in a folder, SVG export now writes plain shapes that more apps can open, and 33 new tools are on the website.
Blends Take Two Arguments
Every blend used to take a foreground, a background, and a transform for the foreground. Most scripts passed Transform2::identity() because they didn't want to move anything. The transform argument is now removed from blend_alpha, blend_add, blend_multiply, blend_subtract, blend_max, blend_min, blend_stencil, and the nonlinear RGB alpha blend, in BrushCue Script, the bcue command line tool, and the Python API.
If you passed the identity transform, delete it:
// Before
filtered.blend_alpha(input_image, Transform2::identity())
// After
filtered.blend_alpha(input_image)
If you passed a real transform, apply it to the foreground with transform before blending:
// Before
Composition::blend_alpha(parasol, backdrop, image_transform)
// After
Composition::blend_alpha(parasol.transform(image_transform), backdrop)
The result is the same, and moving a layer now looks the same everywhere in a script, whether or not it is blended afterward.
Edit Painted Illustrations
BrushCue 1.4.15 added operations to read the parts of a painted illustration: its shape, render style, and instance transforms. This release adds the matching operations to change them. Each one returns a copy with one part replaced:
PaintedIllustrationWithPath(illustration.with_path(path)) replaces the shape with a path. It works on paths, rectangles, and ellipses.PaintedIllustrationWithRenderStyle(illustration.with_render_style(style)) draws the illustration with a different brush and fill.PaintedIllustrationWithInstances(illustration.with_instances(transforms)) replaces the list of transforms the illustration is drawn with.PaintedIllustrationWithTransform(illustration.with_transform(transform)) applies one more transform after each of the existing instance transforms.
Together with to_painted_illustrations and from_painted_illustrations, you can now restyle a painter after it is built. Here, every shape in an existing painter is redrawn in one ink color:
ink = ProfiledColor::from_srgb_hex("#1F3A5F")
style = RenderStyle::brush_only(Brush::solid(ink, 3.0))
fn restyle(illustration: PaintedIllustration) => PaintedIllustration {
illustration.with_render_style(style)
}
Painter::from_painted_illustrations(painter.to_painted_illustrations().map(restyle))
The same pattern works with the path command operations from 1.4.15. Read a path with illustration.path(), change its commands, and put it back with with_path.
List the Files in a Folder
The new ListDirectory operation (path.list_directory(recursive)) returns the paths of the files in a folder as a list of strings. Paths are relative to the project root, so the result can be passed straight to operations like Composition::from_path. Use "" or "." for the project root, and set recursive to true to include files in subfolders.
"assets".list_directory(false)
This works in the bcue command line tool and in the BrushCue editor, which also now shows lists of strings on the canvas so you can see the result.
Simpler SVG Export
SVG export from 1.4.15 defined each shape once and drew it with <use> references. Some apps can't follow those references, so painter.to_svg() now writes one plain SVG element for each instance of each illustration. The rotation of rectangles and ellipses is folded into each element's transform. Files with many repeated shapes are a bit larger, but they open correctly in more vector editors.
New Tools
Since 1.4.15, 33 new tools have been added to the BrushCue website. Each one is a BrushCue Script you can open in the editor and change.
Artist-inspired filters. Ten photo treatments inspired by historical artists, covered in more detail in Introducing Ten Artist-Inspired Photo Filters:
- Emberlight, inspired by Rembrandt
- Quiet Window, inspired by Vermeer
- Blue Current, inspired by Hokusai
- Dissolving Sun, inspired by Turner
- After the Rain, inspired by Monet
- Velvet Stage, inspired by Degas
- Copper Orchard, inspired by Cézanne
- Night Signal, inspired by van Gogh
- Petal Smoke, inspired by Redon
- Stormglass, inspired by El Greco
Blur, sharpen, and print effects. Nine effects, explained in Tilt-Shift, Lens Blur, Unsharp Mask, and Six More New Effects:
- Tilt Shift makes photos look like miniature models.
- Lens Blur spreads each point into a soft disk, like a camera lens.
- Triangle Blur is a smooth two-pass box blur.
- Unsharp Mask sharpens edges with amount, radius, and threshold controls.
- Color Halftone rebuilds an image from cyan, magenta, yellow, and black dots.
- Hexagonal Pixelate fills a honeycomb of hexagons with the average color under each.
- Inked Filter traces strong edges with dark ink lines.
- Pinch Image pulls the inside of a circle toward its center.
- Spherize Image wraps the image around a sphere.
Retouch brushes, shapes, and crops. Twelve hands-on tools, covered in Dodge, Burn, Clone Stamp, and More:
- Brushes: Dodge Tool, Burn Tool, Sponge Tool, Sharpen Part of Image, Clone Stamp, and Erase Part of Image.
- Shapes: Draw Arrow on Image, Draw Circle on Image, Draw Rectangle on Image, and Draw Polygon on Image.
- Crops: Crop Image and Oval Crop.
Also new:
- Polaroid turns a photo into an instant print with faded blacks, warm highlights, soft grain, and a Polaroid frame.
- Heart Crop cuts an image into a heart shape with a transparent background.
Other Changes
- Point subtraction. The new
Point2fSubtractoperation (a.subtract(b)) returns the vector frombtoa. It is the inverse ofadd_vectorfrom 1.4.15. - Painter bounds. A painter's bounds no longer always reach the origin. Before, an empty painter started as a zero-size box at (0, 0), so a painter drawn far from the origin reported bounds that stretched back to it. Now
painter.bounds()covers only what is painted. - Free-form names.
@Nameannotations can now hold any single-line text without square brackets, such as@Name[Mom's Sky (v2)]. Before, names had to be identifier words. - Names on method chains. You can now put a
@Nameon the start of a method chain, such asComposition::painter(p) @Name[Layer].blend_alpha(background), to name that step and not the whole chain. - Fewer crashes. Passing a function with too many parameters to an operation like
mapnow reports an error instead of crashing. - Faster editing of large scripts. Copying an image recipe is now a cheap reference copy instead of a deep copy, which speeds up selection and hit testing on long chains of operations.
- WinGet. New
bcuereleases are published to WinGet automatically, so Windows users can install withwinget install DitoTechnologies.BCue.
Upgrading
Update the bcue command line tool with sudo snap refresh bcue on Linux, brew upgrade bcue on Mac, winget upgrade DitoTechnologies.BCue on Windows, or download it from GitHub releases. Update the Python API with pip install --upgrade brushcue. If your scripts call a blend with three arguments, remove Transform2::identity(), or move a non-identity transform onto the foreground with .transform().