[squeak-dev] The Trunk: Tools-mt.971.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Thu Jun 11 06:14:00 UTC 2020


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 <karlramberg at gmail.com>:
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 <karlramberg at gmail.com [mailto:karlramberg at gmail.com]> wrote:

Cool

Best,
Karl


On Tue, Jun 9, 2020 at 3:48 PM <commits at source.squeak.org [mailto:commits at source.squeak.org]> wrote:

Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.971.mcz [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 at 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.!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200611/049ed182/attachment.html>


More information about the Squeak-dev mailing list