[Cuis-dev] change set to support background image #cover and #tile options

Mark Volkmann r.mark.volkmann at gmail.com
Thu Oct 3 11:54:42 PDT 2024


To test this from a Workspace:

1) Choose an image file and set filePath to point to it. For example,

    filePath := '/Users/volkmannm/Pictures/images/altitude1600.jpg'.

2) Optionally choose a "background effect" which can be nil (current
stretch behavior), #cover, or #tile. I'm pretty sure this is NOT the way we
want to do this, but I couldn't think of another way without adding an
instance variable to PasteUpMorph. I'm open to suggestions on this.

    Smalltalk at: #backgroundEffect put: #cover.

3) Send #backgroundImageData: to the current WorldMorph. Note that a new
stream must be created every time this is sent.

    stream := filePath asFileEntry readStream.
    self runningWorld backgroundImageData: stream binary
contentsOfEntireFile.

4) Optionally remove the background image.

    self runningWorld backgroundImageData: nil.

All three options are working for me.

-- 
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241003/3f6a2934/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6743-CuisCore-MarkVolkmann-2024Oct02-15h08m-RMV.001.cs.st
Type: application/octet-stream
Size: 2486 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20241003/3f6a2934/attachment.obj>


More information about the Cuis-dev mailing list