Strongly Typed Graphs
Previously, execute() returned a generic Type that you needed to cast to the expected result. BrushCue 1.3.0 replaces the public Graph and Type workflow with typed graph wrappers such as Composition, so execute() returns the corresponding result directly.
Before
import brushcue as bc
ctx = bc.Context()
composition = bc.composition_grayscale(bc.composition_monet_women_with_parasol())
result = composition.execute(ctx).as_composition()After
import brushcue as bc
ctx = bc.Context()
composition = bc.Composition.monet_women_with_parasol().grayscale()
result = composition.execute(ctx)Dot Syntax
Before version 1.3.0, BrushCue operations were exposed as module-level functions. In 1.3.0, typed classes provide constructors and operations, and graph transformations can be chained with dot syntax.
Before
import brushcue as bc
bc.composition_color_invert(bc.composition_brightness_adjust(bc.composition_grayscale(bc.composition_monet_women_with_parasol()), 0.8))After
import brushcue as bc
bc.Composition.monet_women_with_parasol().grayscale().brightness_adjust(0.8).color_invert()More Examples
Our Python documentation has been updated alongside the examples.