[squeak-dev] The Trunk: Graphics-pre.439.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Mon Sep 28 10:29:04 UTC 2020


Hi Jakob,

it is start-of-heading (SOH, 001). See https://en.wikipedia.org/wiki/Control_character#Transmission_control [https://en.wikipedia.org/wiki/Control_character#Transmission_control] It is a compromise for "non-data section of a data stream" :-) That is, the morph or form.

Best,
Marcel
Am 25.09.2020 18:41:04 schrieb Jakob Reschke <forums.jakob at resfarm.de>:
What is an SoH character? Does not look like ASCII 001 is meant here.

Am Fr., 25. Sept. 2020 um 09:48 Uhr schrieb :
>
> Patrick Rein uploaded a new version of Graphics to project The Trunk:
> http://source.squeak.org/trunk/Graphics-pre.439.mcz
>
> ==================== Summary ====================
>
> Name: Graphics-pre.439
> Author: pre
> Time: 25 September 2020, 9:48:35.481674 am
> UUID: e6d3328b-645a-e846-a3a9-c3c61b479c23
> Ancestors: Graphics-tonyg.438
>
> Adds code to handle the case in which a text anchor attribute is used on more than the SoH character AND another SoH character is within the range where the text anchor was applied. Without this, the first morph would be put at the location of the second SoH character.
>
> =============== Diff against Graphics-tonyg.438 ===============
>
> Item was changed:
> ----- Method: CharacterScanner>>embeddedObject (in category 'stop conditions') -----
> embeddedObject
>
> + | previousAttributes newAttributes |
> pendingKernX := 0.
> + "If a text anchor was already at the previous index, it was already dealt with"
> + previousAttributes := lastIndex > 1 ifTrue: [text attributesAt: lastIndex - 1] ifFalse: [#()].
> + newAttributes := (text attributesAt: lastIndex) copyWithoutAll: previousAttributes.
> + (newAttributes reject: [:each | each anchoredMorph isNil])
> - ((text attributesAt: lastIndex) reject: [:each | each anchoredMorph isNil])
> ifNotEmpty: [:attributes | (self placeEmbeddedObjectsFrom: attributes) ifTrue: [^ true]].
> self setFont.
>
> "Note: if ever several objects are embedded on same character, only indent lastIndex once"
> lastIndex := lastIndex + 1.
> + ^ false!
> - ^false!
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200928/24f7951e/attachment.html>


More information about the Squeak-dev mailing list