[squeak-dev] [Urgent][4.1.1] Squeak screen shot and backgrounds /
display of pictures
Hannes Hirzel
hannes.hirzel at gmail.com
Thu Apr 29 04:06:57 UTC 2010
Hello
I have tested the FileList fix of Hans-Martin which is in the inbox **
Test
--------
http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/149861.html
Comment on the implementation
-----------------------------------------------------
Bert writes:
"Squeak's "Text" class does support embedded graphics."
Hans-Martin has used this to display the graphics file. He constructs
a text with the image meta data and a font with one "character" which
is the image.
The following is the core code which does this job. Note the use of
the class FormSetFont to create the one-character-font on the fly.
form := Form fromFileNamed: self fullName.
........
contents := ('Image extent: ', ext printString) asText,
(String with: Character cr),
(Text string: ' '
attribute: (TextFontReference toFont:
(FormSetFont new
fromFormArray:
(Array with: form)
asciiStart:
Character space asInteger
ascent: form height))).
Recommendation
--------------------------
I recommend to include this in the trunk.
I agree with Bert that this is not so urgent as to make an immediate
4.1.1. necessary. But in case a 4.1.1 gets released I would say this
should be included.
I think people expect these days that a multimedia Squeak displays a
picture in the FileExplorer (i.e. FileList). It is good that
important meta information (size) is displayed as well. This is a nice
example of a picture embedded in a text and very useful not only in
FileList. I am happy that this is possible again in Squeak 4.1
--Hannes
**
The code this mail is about
http://source.squeak.org/inbox/Tools-hmm.236.mcz
On 4/28/10, Hannes Hirzel <hannes.hirzel at gmail.com> wrote:
> Hans-Martin
>
> Thank you very much indeed for taking care of this!
> I have seen your entry in the inbox yesterday and I wanted to react
> immediately but then I had to go.
>
> This was a very needed fix.
>
> The other remark about FormSetFont is helpful as well. If I understand
> you correctly it means that the fix is not so difficult....
>
> --Hannes
>
> On 4/27/10, Hans-Martin Mosner <hmm at heeg.de> wrote:
>> Am 27.04.2010 00:56, schrieb Hannes Hirzel:
>>>
>>> My concern at _this_ very moment is that Squeak 4.1 does not have a
>>> preview for graphic files in the FileList.
>>>
>>> Having that will solve the immediate problem that a new person who
>>> starts to use the FileList will think: "what have these guys been
>>> doing all the time if can't display a graphic image in the file
>>> explorer?"
>>>
>> You have been heard. Looks at Tools-hmm.236 in the Inbox.
>>
>> BTW, FormSetFont works (due to the aforementioned bit rot) only when the
>> text emphasized with it contains a space character.
>> The necessary changes to make it work with other characters are left as
>> an exercise for the reader :-)
>>
>> Cheers,
>> Hans-Martin
>>
>>
>
More information about the Squeak-dev
mailing list
|