Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!cam-news-feed3.bbnplanet.com!cam-news-hub1.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!rill.news.pipex.net!pipex!blackbush.xlink.net!ins.net!heeg.de!uucp
From: Hans-Martin Mosner <hmm@heeg.de>
Subject: Re: [VW 2.5] Drawing geometrics over Images?
Content-Type: text/plain; charset=us-ascii
To: Leon.Hurst@cs.tcd.ie
Message-ID: <331A966A.1FA3@heeg.de>
Sender: uucp@heeg.de
Content-Transfer-Encoding: 7bit
Organization: Georg Heeg Objektorientierte Systeme
References: <3315A60B.50D3@cs.tcd.ie>
Mime-Version: 1.0
Date: Mon, 3 Mar 1997 09:14:18 GMT
X-Mailer: Mozilla 2.01I [de] (WinNT; I)
Lines: 20

Leon Hurst wrote:
> 
> Has anyone managed to draw geometric shapes such a Arcs and Lines
> over a bitmap Image on a display?
> 
> Drawing a geometric over a bitmap seems to delete (visually)the bitmap.Huh? Just drawing something only changes the pixels that are part of the newly-drawn 
object, but that's exactly what you want. You must be doing something fundamentally 
wrong. Do you just use the GraphicsContext drawing methods, or do you build a 
VisualComponent/VisualPart/CompositePart hierarchy? An example of using the latter is:

| composite |
composite := CompositePart new.
composite add: Image parcPlaceLogo.
composite add: ((GraphicsAttributesWrapper on:
	((Circle center: 100@100 radius: 70) asStroker lineWidth: 5))
		attributes: (GraphicsAttributes new paint: ColorValue blue)).
ScheduledWindow new component: composite; openWithExtent: 200@200

Hope this helps,
Hans-Martin
