'From Squeakland 3.8-05 of 7 September 2005 [latest update: #530] on 1 February 2006 at 6:44:05 am'! "Change Set: nebraskaFix Date: 28 September 2005 Author: Yoshiki Ohshima Make Nebraska work (again) in Vancouver image."! !CanvasDecoder class methodsFor: 'class initialization' stamp: 'yo 12/15/2005 16:07'! initialize "CanvasDecoder initialize" "Set up my cache and decode table if necessary." CachedForms ifNil: [CachedForms := Array new: 100]. DecodeTable ifNotNil: [ ^self ]. DecodeTable _ Array new: 128. #((codeClip setClip:) (codeTransform setTransform:) (codeText drawText:) (codeLine drawLine:) (codeRect drawRect:) (codeBalloonRect drawBalloonRect:) (codeBalloonOval drawBalloonOval:) (codeInfiniteFill drawInfiniteFill:) (codeOval drawOval:) (codeImage drawImage:) (codeReleaseCache releaseImage:) (codePoly drawPoly:) (codeStencil drawStencil:) (codeForce forceToScreen:) (codeFont addFontToCache:) (codeFontSet addFontSetToCache:) (codeMultiText drawMultiText:) (codeTTCFont addTTCFontToCache:) (codeExtentDepth extentDepth:) (codeShadowColor shadowColor:)) do: [ :arr | (DecodeTable at: ((CanvasEncoder perform: arr first) asciiValue + 1)) ifNotNil: [self error: 'duplicated code']. DecodeTable at: ((CanvasEncoder perform: arr first) asciiValue + 1) put: arr second ]. ! ! !CanvasEncoder methodsFor: 'fonts' stamp: 'yo 9/28/2005 12:06'! sendFont: aFont atIndex: index "Transmits the given fint to the other side" | code | code _ CanvasEncoder codeFont. (aFont isMemberOf: StrikeFontSet) ifTrue: [code _ CanvasEncoder codeFontSet]. aFont isTTCFont ifTrue: [code _ CanvasEncoder codeTTCFont]. self sendCommand: { String with: code. self class encodeInteger: index. self class encodeFont: aFont }. ! ! !RemoteCanvas methodsFor: 'as yet unclassified' stamp: 'yo 9/28/2005 12:53'! isVisible: aRectangle "Optimization" | myOrigin myRect | myRect _ self clipRect. myOrigin _ self origin. (aRectangle right + myOrigin x) < myRect left ifTrue: [^ false]. (aRectangle left + myOrigin x) > myRect right ifTrue: [^ false]. (aRectangle bottom + myOrigin y) < myRect top ifTrue: [^ false]. (aRectangle top + myOrigin y) > myRect bottom ifTrue: [^ false]. ^ true ! ! CanvasDecoder initialize! "Postscript:" CanvasDecoder reinitialize. !