The Trunk: Tools-mt.971.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Tools-mt.971.mcz

commits-2
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.971.mcz

==================== Summary ====================

Name: Tools-mt.971
Author: mt
Time: 9 June 2020, 3:48:35.364373 pm
UUID: 229a24af-36d4-ef41-bb06-07b7ffeb9486
Ancestors: Tools-mt.970

Adds an inspector for forms with a "pixels" field that embeds the form as special font to see the pixels in the value pane. I think that there is no alpha support in FormSetFont ...

=============== Diff against Tools-mt.970 ===============

Item was added:
+ ----- Method: Form>>inspectorClass (in category '*Tools-Inspector') -----
+ inspectorClass
+
+ ^ FormInspector!

Item was added:
+ Inspector subclass: #FormInspector
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'Tools-Inspector'!

Item was added:
+ ----- Method: FormInspector>>embedForm:inText: (in category 'support') -----
+ embedForm: aForm inText: stringOrText
+
+ ^ stringOrText asText, String cr,
+ (Text string: ' ' attribute:
+ (TextFontReference toFont:
+ (FormSetFont new
+ fromFormArray: (Array with: (aForm copy offset: 0@0))
+ asciiStart: Character space asInteger
+ ascent: aForm height)))!

Item was added:
+ ----- Method: FormInspector>>fieldPixels (in category 'fields') -----
+ fieldPixels
+
+ ^ (self newFieldForType: #misc key: #extent)
+ name: 'pixels' translated; emphasizeName;
+ shouldPrintValueAsIs: true;
+ valueGetter: [:form | self embedForm: form inText: form printString];
+ yourself!

Item was added:
+ ----- Method: FormInspector>>streamBaseFieldsOn: (in category 'fields - streaming') -----
+ streamBaseFieldsOn: aStream
+
+ super streamBaseFieldsOn: aStream.
+ aStream nextPut: self fieldPixels.!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.971.mcz

Karl Ramberg
Cool

Best,
Karl

On Tue, Jun 9, 2020 at 3:48 PM <[hidden email]> wrote:
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.971.mcz

==================== Summary ====================

Name: Tools-mt.971
Author: mt
Time: 9 June 2020, 3:48:35.364373 pm
UUID: 229a24af-36d4-ef41-bb06-07b7ffeb9486
Ancestors: Tools-mt.970

Adds an inspector for forms with a "pixels" field that embeds the form as special font to see the pixels in the value pane. I think that there is no alpha support in FormSetFont ...

=============== Diff against Tools-mt.970 ===============

Item was added:
+ ----- Method: Form>>inspectorClass (in category '*Tools-Inspector') -----
+ inspectorClass
+
+       ^ FormInspector!

Item was added:
+ Inspector subclass: #FormInspector
+       instanceVariableNames: ''
+       classVariableNames: ''
+       poolDictionaries: ''
+       category: 'Tools-Inspector'!

Item was added:
+ ----- Method: FormInspector>>embedForm:inText: (in category 'support') -----
+ embedForm: aForm inText: stringOrText
+
+       ^ stringOrText asText, String cr,
+               (Text string: ' ' attribute:
+                       (TextFontReference toFont:
+                               (FormSetFont new
+                                       fromFormArray: (Array with: (aForm copy offset: 0@0))
+                                       asciiStart: Character space asInteger
+                                       ascent: aForm height)))!

Item was added:
+ ----- Method: FormInspector>>fieldPixels (in category 'fields') -----
+ fieldPixels
+
+       ^ (self newFieldForType: #misc key: #extent)
+               name: 'pixels' translated; emphasizeName;
+               shouldPrintValueAsIs: true;
+               valueGetter: [:form | self embedForm: form inText: form printString];
+               yourself!

Item was added:
+ ----- Method: FormInspector>>streamBaseFieldsOn: (in category 'fields - streaming') -----
+ streamBaseFieldsOn: aStream
+
+       super streamBaseFieldsOn: aStream.
+       aStream nextPut: self fieldPixels.!




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.971.mcz

Karl Ramberg
Form of depth 8 does not look so good in 32 bit depth.

Best,
Karl

On Tue, Jun 9, 2020 at 5:30 PM karl ramberg <[hidden email]> wrote:
Cool

Best,
Karl

On Tue, Jun 9, 2020 at 3:48 PM <[hidden email]> wrote:
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.971.mcz

==================== Summary ====================

Name: Tools-mt.971
Author: mt
Time: 9 June 2020, 3:48:35.364373 pm
UUID: 229a24af-36d4-ef41-bb06-07b7ffeb9486
Ancestors: Tools-mt.970

Adds an inspector for forms with a "pixels" field that embeds the form as special font to see the pixels in the value pane. I think that there is no alpha support in FormSetFont ...

=============== Diff against Tools-mt.970 ===============

Item was added:
+ ----- Method: Form>>inspectorClass (in category '*Tools-Inspector') -----
+ inspectorClass
+
+       ^ FormInspector!

Item was added:
+ Inspector subclass: #FormInspector
+       instanceVariableNames: ''
+       classVariableNames: ''
+       poolDictionaries: ''
+       category: 'Tools-Inspector'!

Item was added:
+ ----- Method: FormInspector>>embedForm:inText: (in category 'support') -----
+ embedForm: aForm inText: stringOrText
+
+       ^ stringOrText asText, String cr,
+               (Text string: ' ' attribute:
+                       (TextFontReference toFont:
+                               (FormSetFont new
+                                       fromFormArray: (Array with: (aForm copy offset: 0@0))
+                                       asciiStart: Character space asInteger
+                                       ascent: aForm height)))!

Item was added:
+ ----- Method: FormInspector>>fieldPixels (in category 'fields') -----
+ fieldPixels
+
+       ^ (self newFieldForType: #misc key: #extent)
+               name: 'pixels' translated; emphasizeName;
+               shouldPrintValueAsIs: true;
+               valueGetter: [:form | self embedForm: form inText: form printString];
+               yourself!

Item was added:
+ ----- Method: FormInspector>>streamBaseFieldsOn: (in category 'fields - streaming') -----
+ streamBaseFieldsOn: aStream
+
+       super streamBaseFieldsOn: aStream.
+       aStream nextPut: self fieldPixels.!




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Tools-mt.971.mcz

marcel.taeumel
Yeah, I think that the render path through AbstractFont/StrikeFont is not the best to display non-glyph forms. A better way would be to use TextAnchor property. See HtmlReadWriter >> #mapImgTag:.

Best,
Marcel

Am 10.06.2020 22:08:25 schrieb karl ramberg <[hidden email]>:

Form of depth 8 does not look so good in 32 bit depth.

Best,
Karl

On Tue, Jun 9, 2020 at 5:30 PM karl ramberg <[hidden email]> wrote:
Cool

Best,
Karl

On Tue, Jun 9, 2020 at 3:48 PM <[hidden email]> wrote:
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.971.mcz

==================== Summary ====================

Name: Tools-mt.971
Author: mt
Time: 9 June 2020, 3:48:35.364373 pm
UUID: 229a24af-36d4-ef41-bb06-07b7ffeb9486
Ancestors: Tools-mt.970

Adds an inspector for forms with a "pixels" field that embeds the form as special font to see the pixels in the value pane. I think that there is no alpha support in FormSetFont ...

=============== Diff against Tools-mt.970 ===============

Item was added:
+ ----- Method: Form>>inspectorClass (in category '*Tools-Inspector') -----
+ inspectorClass
+
+       ^ FormInspector!

Item was added:
+ Inspector subclass: #FormInspector
+       instanceVariableNames: ''
+       classVariableNames: ''
+       poolDictionaries: ''
+       category: 'Tools-Inspector'!

Item was added:
+ ----- Method: FormInspector>>embedForm:inText: (in category 'support') -----
+ embedForm: aForm inText: stringOrText
+
+       ^ stringOrText asText, String cr,
+               (Text string: ' ' attribute:
+                       (TextFontReference toFont:
+                               (FormSetFont new
+                                       fromFormArray: (Array with: (aForm copy offset: 0@0))
+                                       asciiStart: Character space asInteger
+                                       ascent: aForm height)))!

Item was added:
+ ----- Method: FormInspector>>fieldPixels (in category 'fields') -----
+ fieldPixels
+
+       ^ (self newFieldForType: #misc key: #extent)
+               name: 'pixels' translated; emphasizeName;
+               shouldPrintValueAsIs: true;
+               valueGetter: [:form | self embedForm: form inText: form printString];
+               yourself!

Item was added:
+ ----- Method: FormInspector>>streamBaseFieldsOn: (in category 'fields - streaming') -----
+ streamBaseFieldsOn: aStream
+
+       super streamBaseFieldsOn: aStream.
+       aStream nextPut: self fieldPixels.!