Working with mathmorphs?

Andreas Raab andreas.raab at gmx.de
Thu Mar 6 20:34:40 UTC 2003


QuickPrint _was_ removed ages ago.

Cheers,
  - Andreas

> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of Stephane Ducasse
> Sent: Thursday, March 06, 2003 9:24 PM
> To: The general-purpose Squeak developers list
> Subject: Re: Working with mathmorphs?
> 
> 
> Andreas
> 
> if I understand correclty this means that this class QuickPrint could 
> be then removed from Squeak
> 
> Stef
> On Thursday, March 6, 2003, at 08:53 PM, Andreas Raab wrote:
> 
> > Hi,
> >
> >>> (b) the Vertex class in the graph package on the mathMorphs
> >>> site uses a class called "QuickPrint" which doesn't seem to
> >>> exist in the current image (and about which the only hint I
> >>> can find on the Swiki is an aside about "DisplayScanner's
> >>> #quickPrint: variants").
> >>
> >> Squeak 2.7 was the last version with QuickPrint.  That class
> >> implemented fast, single-line string display.
> >> Squeak 2.8 is the first version with quick print protocol in class
> >> DisplayScanner. (You found the right hint in the 3.4 image)
> >> QuickPrint was a sublcass of CharacterScanner, which in
> >> turn at that time was a subclass of BitBlt. Now CharacterScanner is
> >> subclassed to Object and when you try to file in 
> QuickPrint you will
> >> be told that some instance variables (those inherited from 
> BitBlt) are
> >> undefined. So this will also not work. We have no other choice than
> >> to move all this MathMorphs stuff to the new quickprint protocol
> >> in DisplayScanner.
> >
> > QuickPrint had no longer a purpose when the "regular" 
> display protocol 
> > was
> > streamlined and out-performed QuickPrint by factors of 2-5. 
> Most users 
> > of
> > QuickPrint were clients who wanted to measure the width of 
> a certain 
> > string
> > (QuickPrint's #stringWidth: protocol) which you can simply 
> replace by
> > querying the font itself (#widthOfString:). E.g., typically 
> QuickPrint 
> > was
> > used for something like
> >
> > 	scanner := QuickPrint newOn: Display box: Display 
> boundingBox font:
> > aFont.
> > 	aWidth := (scanner stringWidth: aString).
> >
> > which can be replaced trivially by
> >
> > 	aWidth := aFont widthOfString: aString.
> >
> > Displaying should always be done by going through the appropriate 
> > canvas
> > protocol, so unless there's some magic involved in 
> MathMorphs (which I 
> > don't
> > think) the above is the only issue you need to check.
> >
> > Cheers,
> >   - Andreas
> >
> >
> >
> Prof. Dr. Stéphane DUCASSE (ducasse at iam.unibe.ch) 
> http://www.iam.unibe.ch/~ducasse/
>   "if you knew today was your last day on earth, what would you do 
> different? ...  especially if,
>   by doing something different, today might not be your last day on 
> earth" Calvin&Hobbes
> 
> "The best way to predict the future is to invent it..." Alan Kay.
> 
> Open Source Smalltalks: www.squeak.org, 
> www.gnu.org/software/smalltalk/smalltalk.html
> Free books for Universities at 
> http://www.esug.org/sponsoring/promotionProgram.html
> Free Online Book at www.iam.unibe.ch/~ducasse/FreeBooks.html
> 
> 



More information about the Squeak-dev mailing list