Transparent Image Support
Description

Library for display of images with a transparent background.

Files

Trans.SLL  Transparent image background
support library.
Trans.DLL  Support DLL
Trans.ST
Trans.PRJ
Source files
256.rle
back.tif
Sample mage and background graphic
Trans Doit.txt Demo expressions

Requirements

VS/VSE 3.1.2 for Win32s. Requires the following libraries:
 
ARBase.sll Alejandro Reimondo base components SLL 
ARPatchs.sll Patches and bug fixes
ARAddins.sll SelfDefinedStructures support
ARMisc.sll  Misc. OS Support
PictBase.sll Image Framework

Installation

Ensure the libraries above are loaded in the VS/VSE library directory or a directory that appears in the Windows PATH statement. To load all required libraries evaluate

#('ARBase' 'ARPatchs' 'ARAddIns' 'ARMisc' 'PictBase' 'Trans' )   do:[:lib|SmalltalkLibraryBinder bindTo:lib].

Examples

Evaluate the following expressions to demonstrate rendering an image with a transparent background. See 'Trans Doit.txt' for more examples.

"Load an image file and display at screen origin."
image := TransparentImage fromUser. image displayWith: Display pen.

"The following example requires LibTiff to be installed"
"Basic demo..."
| image background praghPane |
TIFFDLL32 current: nil.
image := TIFFImage fromFile: 'Back.tif'.
image isValid ifFalse: [ ^self error: 'file not found...' ].
background := image asBitmap.
image release.
image := TransparentImage fromFile: '256.rle'.
image notNil
   ifTrue: [ graphPane := GraphPane openWindow: 'Test'.
             graphPane
               bitmap: background;
               when: #mouseMoved: do: [:point|
                  image displayAt: point - (image extent // 2) with: graphPane pen ];                update.
             graphPane parent when: #closed send: #release to: image. ].

Contact

Alejandro F. Reimondo
Amenabar 3476 Piso: 2 Dto: B.
Ciudad de Buenos Aires.
Argentina.
Tel: (54)-1-703-5586.
aleReimondo@sugarWeb.com
http://www.sugarweb.com


Links to:
The ObjectShare web site
VisualSmalltalk Product Support
ObjectShare's Online Documentation Site