The Inbox: Balloon-ct.37.mcz
[email protected] Sun, 28 Jun 2026 22:56:04 0000
| Newsgroups | gmane.comp.lang.smalltalk.squeak.general |
|---|---|
| Message-ID | <[email protected]> |
Christoph Thiede uploaded a new version of Balloon to project The Inbox:
http://source.squeak.org/inbox/Balloon-ct.37.mcz
==================== Summary ====================
Name: Balloon-ct.37
Author: ct
Time: 29 June 2026, 12:56:04.760334 am
UUID: 00214bdd-69f9-488c-a804-07081a816d5d
Ancestors: Balloon-ct.36
Adds tooling for inspecting fill styles.
When merging, consider moving #asMorph into a *Morphic extension method.
=============== Diff against Balloon-ct.36 ===============
Item was added:
+ ----- Method: FillStyle>>asMorph (in category 'converting') -----
+ asMorph
+
+ ^ (Smalltalk at: #Morph) new
+ fillStyle: self;
+ yourself!
Item was added:
+ ----- Method: FillStyle>>inspectorFieldPreviewFor: (in category 'tools') -----
+ inspectorFieldPreviewFor: anInspector
+ <inspectorField>
+
+ ^ (anInspector newFieldForType: #misc key: #preview)
+ name: 'preview' translated; emphasizeName;
+ printValueAsIs;
+ valueGetter: [:fillStyle | fillStyle asMorph imageForm];
+ printBlock: [:form | FormInspector new embedForm: form inText: form printString];
+ yourself!
Item was changed:
----- Method: GradientFillStyle class>>colors: (in category 'instance creation') -----
colors: colorArray
+ "(self colors: {Color green. Color red}) origin: 50@0; direction: 150@150; openAsMorph"
- "(self colors: {Color green. Color red}) origin: 50@0; direction: 150@150"
"Create a gradient fill style from an array of equally spaced colors"
^self ramp: (colorArray withIndexCollect:
[:color :index| (index-1 asFloat / (colorArray size - 1 max: 1)) -> color]).!
Item was added:
+ ----- Method: OrientedFillStyle>>asMorph (in category 'converting') -----
+ asMorph
+
+ ^ super asMorph
+ extent: self origin + self direction;
+ yourself!
Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]