'From etoys3.0 of 24 February 2008 [latest update: #1931] on 24 March 2008 at 6:13:03 pm'! "Change Set: romepango-base Date: 11 June 2007 Author: Yoshiki Ohshima The code borrowed from the Rome package."! Object subclass: #RomeCanvas instanceVariableNames: '' classVariableNames: 'ForceBalloonCanvas' poolDictionaries: '' category: 'Rome-Base'! Object subclass: #RomeFont instanceVariableNames: 'familyName styleName bold italic postscriptName' classVariableNames: '' poolDictionaries: '' category: 'Rome-Base'! RomeCanvas subclass: #RomePluginCanvas instanceVariableNames: 'handle target flags strokeColor stack font fontSize fontMatrix' classVariableNames: 'ComposingCanvas DrawingCanvas FlagFill FlagStroke PangoAvailable Registry' poolDictionaries: '' category: 'Rome-PluginCanvas'! !RomePluginCanvas commentStamp: '' prior: 0! INST VAR ORDER IS KNOWN TO PLUGIN!! DO NOT REARRANGE!! handle: index in plugin's contexts array, nil if closed target: RomePluginTargetForm flags: bits 0 to 7 = stroke alpha (0 = no stroke) bit 8 = do fill strokeColor: rgb of stroke color (10 bits per component)! Form subclass: #RomePluginForm instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Rome-PluginCanvas'! RomePluginForm subclass: #RomePluginSourceForm instanceVariableNames: 'source' classVariableNames: '' poolDictionaries: '' category: 'Rome-PluginCanvas'! RomePluginForm subclass: #RomePluginTargetForm instanceVariableNames: 'target' classVariableNames: '' poolDictionaries: '' category: 'Rome-PluginCanvas'! !DisplayTransform methodsFor: '*Rome-PluginCanvas' stamp: 'bf 8/28/2006 17:58'! transformRomePluginCanvas: aCanvas ^self subclassResponsibility ! ! !CompositeTransform methodsFor: '*Rome-PluginCanvas' stamp: 'bf 8/28/2006 18:06'! transformRomePluginCanvas: aCanvas globalTransform transformRomePluginCanvas: aCanvas. ^localTransform transformRomePluginCanvas: aCanvas. ! ! !Form methodsFor: '*Rome-PluginCanvas' stamp: 'be 7/31/2006 10:31'! asRomePluginSourceForm | f | f := RomePluginSourceForm extent: self extent depth: self romePluginSourceFormDepth. f source: self. f offset: offset. ^f! ! !Form methodsFor: '*Rome-PluginCanvas' stamp: 'bf 7/28/2006 12:16'! asRomePluginTargetForm | f | f := RomePluginTargetForm extent: self extent depth: 32. f target: self. ^f! ! !Form methodsFor: '*Rome-PluginCanvas' stamp: 'bf 7/25/2006 14:50'! isRomePluginForm ^false! ! !Form methodsFor: '*Rome-PluginCanvas' stamp: 'be 7/31/2006 10:34'! romePluginSourceFormDepth ^(depth = 1 and: [SmalltalkImage current endianness == #big]) ifTrue: [1] ifFalse: [32]! ! !ColorForm methodsFor: '*Rome-PluginCanvas' stamp: 'be 7/31/2006 10:30'! romePluginSourceFormDepth ^32! ! !IdentityTransform methodsFor: '*Rome-PluginCanvas' stamp: 'bf 8/28/2006 17:59'! transformRomePluginCanvas: aCanvas ^aCanvas! ! !MatrixTransform2x3 methodsFor: '*Rome-PluginCanvas' stamp: 'bf 8/28/2006 17:59'! transformRomePluginCanvas: aCanvas ^aCanvas primTransformBy: self! ! !MorphicTransform methodsFor: '*Rome-PluginCanvas' stamp: 'bf 8/28/2006 18:08'! transformRomePluginCanvas: aCanvas ^aCanvas translateBy: offset; rotateBy: angle; scaleBy: scale ! ! !RomeCanvas methodsFor: 'converting' stamp: 'bf 7/25/2006 11:12'! asRomeCanvas ^self! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/25/2006 13:44'! blendImage: aForm "Draw a translucent image with the set of parameters" ^self blendImage: aForm at: 0@0! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/25/2006 13:44'! blendImage: aForm at: aPoint "Draw a translucent image with the set of parameters" ^self blendImage: aForm at: aPoint sourceRect: aForm boundingBox! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/28/2006 18:09'! blendImage: aForm at: aPoint sourceRect: aRectangle "Draw a translucent image with the set of parameters" ^self blendImage: aForm in: (aPoint extent: aRectangle extent) sourceRect: aRectangle! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/25/2006 13:46'! blendImage: aForm in: destRect "Draw a translucent image with the set of parameters" ^self blendImage: aForm in: destRect sourceRect: aForm boundingBox! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/25/2006 14:01'! blendImage: aForm in: destRect sourceRect: aRectangle "Draw a translucent image with the set of parameters" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/25/2006 13:46'! drawImage: aForm "Draw a fully opaque image with the set of parameters" ^self drawImage: aForm at: 0@0! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/25/2006 13:44'! drawImage: aForm at: aPoint "Draw a fully opaque image with the set of parameters" ^self drawImage: aForm at: aPoint sourceRect: aForm boundingBox! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/28/2006 18:09'! drawImage: aForm at: aPoint sourceRect: aRectangle "Draw a fully opaque image with the set of parameters" ^self drawImage: aForm in: (aPoint extent: aRectangle extent) sourceRect: aRectangle! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/25/2006 13:51'! drawImage: aForm in: destRect "Draw a fully opaque image with the set of parameters" ^self drawImage: aForm in: destRect sourceRect: aForm boundingBox! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/25/2006 14:01'! drawImage: aForm in: destRect sourceRect: sourceRect "Draw a fully opaque image with the set of parameters" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/25/2006 13:51'! paintImage: aForm "Draw a color keyed image with the set of parameters" ^self paintImage: aForm at: 0@0! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/25/2006 13:51'! paintImage: aForm at: aPoint "Draw a color keyed image with the set of parameters" ^self paintImage: aForm at: aPoint sourceRect: aForm boundingBox! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/28/2006 18:08'! paintImage: aForm at: aPoint sourceRect: aRectangle "Draw a color keyed image with the set of parameters" ^self paintImage: aForm in: (aPoint extent: aRectangle extent) sourceRect: aRectangle! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/25/2006 13:52'! paintImage: aForm in: destRect "Draw a color keyed image with the set of parameters" ^self paintImage: aForm in: destRect sourceRect: aForm boundingBox! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/25/2006 14:02'! paintImage: aForm in: destRect sourceRect: aRectangle "Draw a color keyed image with the set of parameters" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/28/2006 18:34'! stencilImage: aForm "Paint selected fill wherever aForm is non-transparent" ^self stencilImage: aForm at: 0@0! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/28/2006 18:34'! stencilImage: aForm at: aPoint "Paint selected fill wherever aForm is non-transparent" ^self stencilImage: aForm at: aPoint sourceRect: aForm boundingBox! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/28/2006 18:34'! stencilImage: aForm at: aPoint sourceRect: aRectangle "Paint selected fill wherever aForm is non-transparent" ^self stencilImage: aForm in: (aPoint extent: aRectangle extent) sourceRect: aRectangle! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/28/2006 18:34'! stencilImage: aForm in: destRect "Paint selected fill wherever aForm is non-transparent" ^self stencilImage: aForm in: destRect sourceRect: aForm boundingBox ! ! !RomeCanvas methodsFor: 'drawing images' stamp: 'bf 7/28/2006 18:34'! stencilImage: aForm in: destRect sourceRect: aRectangle "Paint selected fill wherever aForm is non-transparent" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing' stamp: 'bf 7/29/2006 01:39'! clear "clear current clip region to selected fill" ^self subclassResponsibility! ! !RomeCanvas methodsFor: 'attributes canvas ' stamp: 'bf 8/1/2006 00:50'! clipRectangle: aRect "clip all further drawing to aRectangle" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'attributes canvas ' stamp: 'bf 8/1/2006 00:43'! selectFill: aFill "Select the fill to use to use for subsequent drawing. This is a write-only operation." ^self subclassResponsibility! ! !RomeCanvas methodsFor: 'attributes canvas ' stamp: 'bf 8/1/2006 00:44'! selectNoFill "Do not fill shapes" ^self subclassResponsibility! ! !RomeCanvas methodsFor: 'attributes canvas ' stamp: 'bf 7/31/2006 17:15'! selectNoPen "Do not draw outlines of shapes" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'attributes canvas ' stamp: 'bf 7/31/2006 16:42'! selectPenWidth: aNumber color: aColor "select a solid Pen of width and color" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing curves' stamp: 'bf 7/25/2006 14:31'! drawArc: radius at: aPoint from: angle1 to: angle2 "Draw an arc segment. The arc will be drawn in CW direction. To reverse the direction of the arc use a negative radius" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing curves' stamp: 'bf 7/25/2006 14:31'! drawCurveFrom: start via: cp1 and: cp2 to: end "Draw a cubic bezier curve" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing curves' stamp: 'bf 7/25/2006 14:31'! drawCurveFrom: start via: offCurve to: end "Draw a quadratic bezier curve" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing curves' stamp: 'bf 7/25/2006 14:32'! drawLineFrom: startPoint to: endPoint "Draw a line from startPoint to endPoint." ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing curves' stamp: 'bf 7/25/2006 17:51'! drawPolyline: aCollection "Draw a polyline using the given set of vertices" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing shapes' stamp: 'bf 7/25/2006 14:26'! drawOval: aRectangle "Draw an oval specified by the given rectangle" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing shapes' stamp: 'bf 7/25/2006 17:51'! drawPolygon: aCollection "Draw a polygon using the given set of vertices" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing shapes' stamp: 'bf 7/25/2006 14:26'! drawRectangle: aRectangle "Draw aRectangle." ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing shapes' stamp: 'bf 7/25/2006 14:25'! drawRoundRect: aRectangle radius: radius "Draw a rounded rectangle" ^self drawRoundRect: aRectangle radius: radius corners: 15! ! !RomeCanvas methodsFor: 'drawing shapes' stamp: 'bf 7/31/2006 14:19'! drawRoundRect: aRectangle radius: aRadius corners: flags "Draw a round rectangle using the specified position and size, radius, and corners to round (sum of 1=topLeft, 2=bottomLeft, 4=bottomRight, 8=topRight)." ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'drawing text' stamp: 'bf 7/25/2006 14:22'! drawString: aString "Draw a string with the given set of parameters" ^self drawString: aString at: 0@0! ! !RomeCanvas methodsFor: 'drawing text' stamp: 'bf 7/25/2006 14:22'! drawString: aString at: aPoint "Draw a string with the given set of parameters" ^self drawString: aString at: aPoint from: 1 to: aString size! ! !RomeCanvas methodsFor: 'drawing text' stamp: 'bf 7/25/2006 14:23'! drawString: aString at: aPoint from: startIndex to: stopIndex "Draw a string with the given set of parameters" ^self subclassResponsibility! ! !RomeCanvas methodsFor: 'drawing text' stamp: 'bf 7/25/2006 14:24'! measureString: aString "Measure the extent of aString." ^self measureString: aString from: 1 to: aString size! ! !RomeCanvas methodsFor: 'drawing text' stamp: 'bf 7/25/2006 14:24'! measureString: aString from: startIndex to: stopIndex "Measure the extent of aString." ^self subclassResponsibility! ! !RomeCanvas methodsFor: 'initialize-release' stamp: 'bf 8/23/2006 10:57'! finish "Flushes the canvas and ensures that he effects are visible on the underlying output medium."! ! !RomeCanvas methodsFor: 'initialize-release' stamp: 'bf 8/23/2006 10:58'! finish: aRectangle "Flushes the canvas and ensures that the effects in aRectangle are visible on the underlying output medium." ^self finish! ! !RomeCanvas methodsFor: 'attributes text' stamp: 'bf 8/1/2006 00:48'! font "Answer the currently selected font" ^self subclassResponsibility! ! !RomeCanvas methodsFor: 'attributes text' stamp: 'bf 8/1/2006 00:49'! fontMatrix "Answer the current transform for fonts" ^self subclassResponsibility! ! !RomeCanvas methodsFor: 'attributes text' stamp: 'bf 8/1/2006 00:47'! fontMatrix: aTransform "Set the matrix transforming from font design units to user space. Normally this is just a scale (via fontSize) but can be overridden to achieve shearing and other effects." ^self subclassResponsibility! ! !RomeCanvas methodsFor: 'attributes text' stamp: 'bf 8/1/2006 00:49'! fontSize "Answer the currently selected font size." ^self subclassResponsibility! ! !RomeCanvas methodsFor: 'attributes text' stamp: 'bf 8/1/2006 00:48'! fontSize: aNumber "Select a new font size." ^self subclassResponsibility! ! !RomeCanvas methodsFor: 'attributes text' stamp: 'bf 8/1/2006 00:47'! font: aFont "Set the font to be used for subsequent drawing" ^self subclassResponsibility! ! !RomeCanvas methodsFor: 'preserve state' stamp: 'bf 8/1/2006 00:45'! preserveStateDuring: aBlock "Restore all attributes after evaluating aBlock" ^self subclassResponsibility! ! !RomeCanvas methodsFor: 'preserve state' stamp: 'bf 8/1/2006 00:45'! preserveTransformDuring: aBlock "Restore transform after evaluating aBlock" ^self subclassResponsibility! ! !RomeCanvas methodsFor: 'transforming' stamp: 'bf 7/25/2006 14:34'! rotateBy: angle "Rotate all further drawing operations by angle" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'transforming' stamp: 'bf 7/25/2006 14:34'! rotateBy: angle around: center "Rotate all further drawing operations by angle around center" ^self translateBy: center; rotateBy: angle; translateBy: center negated! ! !RomeCanvas methodsFor: 'transforming' stamp: 'bf 7/25/2006 14:34'! scaleBy: scale "Scale all further drawing operations by scale" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'transforming' stamp: 'bf 7/25/2006 14:35'! transform "Answer the currently selected transform" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'transforming' stamp: 'bf 7/25/2006 14:35'! transformBy: aTransform "Transform all further drawing operations by aTransform" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'transforming' stamp: 'bf 7/25/2006 14:35'! transform: aTransform "Set the transform to be used for subsequent drawing" ^self subclassResponsibility ! ! !RomeCanvas methodsFor: 'transforming' stamp: 'bf 7/25/2006 14:35'! translateBy: offset "Offset all further drawing operations by offset" ^self subclassResponsibility ! ! !RomeCanvas class methodsFor: 'subclasses' stamp: 'bf 7/24/2006 14:10'! asConcreteCanvas ^self isAbstract ifTrue: [self concreteCanvas] ifFalse: [self] ! ! !RomeCanvas class methodsFor: 'subclasses' stamp: 'bf 8/28/2006 18:56'! concreteCanvas ForceBalloonCanvas == true ifFalse: [ Smalltalk at: #RomePluginCanvas ifPresent: [:pluginCanvas | pluginCanvas pluginAvailable ifTrue: [^pluginCanvas]]]. Smalltalk at: #RomeBalloonCanvas ifPresent: [:balloonCanvas | ^balloonCanvas]. self error: 'no concrete rome canvas available'! ! !RomeCanvas class methodsFor: 'subclasses' stamp: 'bf 7/24/2006 11:04'! isAbstract ^self == RomeCanvas! ! !RomeCanvas class methodsFor: 'instance creation' stamp: 'bf 7/24/2006 14:09'! new ^self asConcreteCanvas on: Display! ! !RomeCanvas class methodsFor: 'instance creation' stamp: 'bf 7/24/2006 14:12'! on: aForm ^self isAbstract ifTrue: [self concreteCanvas on: aForm] ifFalse: [super new setTarget: aForm]! ! !RomeFont methodsFor: 'converting' stamp: 'bf 7/31/2006 14:58'! asRomeFont ^self! ! !RomeFont methodsFor: 'accessing' stamp: 'jl 7/5/2006 16:52'! familyName ^familyName! ! !RomeFont methodsFor: 'accessing' stamp: 'mir 7/9/2006 15:01'! postscriptName ^postscriptName ifNil: [postscriptName := (self familyName,'-',self styleName) copyWithout: $ .]! ! !RomeFont methodsFor: 'accessing' stamp: 'jl 7/5/2006 16:52'! styleName ^styleName! ! !RomeFont methodsFor: 'testing' stamp: 'bf 8/23/2006 14:40'! hasLatinGlyphs "Answer false if font does not provide latin glyphs" ^true! ! !RomeFont methodsFor: 'testing' stamp: 'jl 7/5/2006 16:51'! isBold ^bold! ! !RomeFont methodsFor: 'testing' stamp: 'jl 7/5/2006 16:51'! isItalic ^italic ! ! !RomePluginCanvas methodsFor: 'finalization' stamp: 'bf 7/3/2006 15:58'! actAsExecutor target := nil.! ! !RomePluginCanvas methodsFor: 'finalization' stamp: 'bf 7/17/2006 20:02'! finalize self isExecutor ifFalse: [self error: 'finalize called on non-executor']. self close. ! ! !RomePluginCanvas methodsFor: 'finalization' stamp: 'bf 7/3/2006 15:55'! isExecutor ^target isNil! ! !RomePluginCanvas methodsFor: 'finalization' stamp: 'bf 6/30/2006 15:26'! register ^self class register: self! ! !RomePluginCanvas methodsFor: 'finalization' stamp: 'bf 6/30/2006 15:26'! unregister ^self class unregister: self! ! !RomePluginCanvas methodsFor: 'private' stamp: 'bf 7/25/2006 17:28'! arrayFromPoints: aCollection | array pt | array := FloatArray new: aCollection size * 2. 1 to: aCollection size do: [:i | pt := aCollection at: i. array at: 2 * i - 1 put: pt x. array at: 2 * i put: pt y]. ^array! ! !RomePluginCanvas methodsFor: 'private' stamp: 'bf 7/21/2006 18:20'! ftString: aString at: aPoint from: start to: end "selected font is a RomeFreetypeFont, render directly" | utf8String converter | converter := UTF8TextConverter new. utf8String := String streamContents: [:stream | start to: end do: [:i | converter nextPut: (aString at: i) toStream: stream]. stream nextPut: (Character value: 0)]. (flags anyMask: FlagStroke) ifTrue: [self primDrawZeroTerminatedUtf8String: utf8String x: aPoint x asFloat y: aPoint y asFloat] ifFalse: [self primShowZeroTerminatedUtf8String: utf8String x: aPoint x asFloat y: aPoint y asFloat] ! ! !RomePluginCanvas methodsFor: 'private' stamp: 'bf 8/28/2006 19:13'! matrixClass ^Smalltalk at: #CMatrixTransform ifAbsent: [MatrixTransform2x3]! ! !RomePluginCanvas methodsFor: 'private' stamp: 'bf 7/25/2006 13:21'! privateTargetForm ^target privateTarget! ! !RomePluginCanvas methodsFor: 'private' stamp: 'bf 7/31/2006 16:13'! strikeString: aString at: aPoint from: startIndex to: stopIndex "fill has been set, now just draw the string." | pos glyphs xTable height glyphIndex leftX rightX | pos := aPoint - (0@font asStrikeFont ascent) . glyphs := font asStrikeFont glyphs. xTable := font asStrikeFont xTable. height := glyphs height. startIndex to: stopIndex do: [:i | glyphIndex := (aString at: i) charCode + 1. leftX := xTable at: glyphIndex. rightX := xTable at: glyphIndex + 1. self stencilImage: glyphs at: pos sourceRect: (leftX @ 0 corner: rightX @ height). pos := pos + (rightX - leftX @ 0). ] ! ! !RomePluginCanvas methodsFor: 'private' stamp: 'bf 7/31/2006 14:43'! ttString: aString at: aPoint from: startIndex to: stopIndex "selected font is a RomeTTFont, render outlines" self preserveStateDuring: [ self translateBy: aPoint. fontMatrix ifNil: [self scaleBy: fontSize] ifNotNil: [self transformBy: fontMatrix]. self scaleBy: 1.0@-1.0 / font glyphScale. (flags anyMask: FlagStroke) ifTrue: [ self primSetLineWidth: self primGetLineWidth * font glyphScale / self fontSize]. startIndex to: stopIndex do: [:index | | glyph | glyph := font ttGlyphFor: (aString at: index). self drawGeneralBezierShape: glyph contours. index < stopIndex ifTrue: [ | kerning | kerning := font kerningLeft: (aString at: index) right: (aString at: index + 1). self translateBy: (glyph advanceWidth + kerning)@0.0 ]]]. ! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/25/2006 15:05'! blendImage: aForm in: destRect sourceRect: srcRect ^self drawImage: aForm in: destRect sourceRect: srcRect! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/29/2006 01:49'! clear "clear current clip region to selected fill" self primClear! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/24/2006 17:01'! drawArc: radius at: aPoint from: angle1 to: angle2 ^self primDrawArc: radius asFloat x: aPoint x asFloat y: aPoint y asFloat from: angle1 degreesToRadians to: angle2 degreesToRadians! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/24/2006 17:50'! drawCurveFrom: start via: cp1 and: cp2 to: end ^self primDrawCurveFromX: start x asFloat y: start y asFloat viaX: cp1 x asFloat y: cp1 y asFloat andX: cp2 x asFloat y: cp2 y asFloat toX: end x asFloat y: end y asFloat! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/24/2006 17:59'! drawCurveFrom: start via: via to: end ^self primDrawCurveFromX: start x asFloat y: start y asFloat viaX: via x asFloat y: via y asFloat toX: end x asFloat y: end y asFloat! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/31/2006 14:44'! drawGeneralBezierShape: contours self primDrawGeneralBezierShape: contours! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/25/2006 17:11'! drawImage: aForm in: destRect sourceRect: srcRect | f hibernate | f := aForm asSourceForm asRomePluginSourceForm. hibernate := f unhibernate. self primDrawImage: f destLeft: destRect left asFloat right: destRect right asFloat top: destRect top asFloat bottom: destRect bottom asFloat srcLeft: srcRect left asFloat right: srcRect right asFloat top: srcRect top asFloat bottom: srcRect bottom asFloat. hibernate ifTrue: [f hibernate].! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/24/2006 16:41'! drawLineFrom: startPoint to: endPoint ^self primDrawLineFromX: startPoint x asFloat y: startPoint y asFloat toX: endPoint x asFloat y: endPoint y asFloat! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/24/2006 18:16'! drawOval: aRectangle ^self primDrawOvalLeft: aRectangle left asFloat right: aRectangle right asFloat top: aRectangle top asFloat bottom: aRectangle bottom asFloat ! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/25/2006 17:23'! drawPolygon: aCollection "Draw a polygon using the given set of vertices" ^self primDrawPolygon: (self arrayFromPoints: aCollection) ! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/25/2006 17:29'! drawPolyline: aCollection "Draw a polyline using the given set of vertices" ^self primDrawPolyline: (self arrayFromPoints: aCollection) ! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/17/2006 17:57'! drawRectangle: aRectangle ^self primDrawRectangleLeft: aRectangle left asFloat right: aRectangle right asFloat top: aRectangle top asFloat bottom: aRectangle bottom asFloat ! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/18/2006 12:17'! drawRoundRect: aRectangle radius: radius corners: corners ^self primDrawRoundRectLeft: aRectangle left asFloat right: aRectangle right asFloat top: aRectangle top asFloat bottom: aRectangle bottom asFloat radius: radius asFloat corners: corners! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/31/2006 15:53'! drawString: aString at: aPoint from: start to: end ^font render: aString at: aPoint from: start to: end on: self! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/25/2006 15:05'! paintImage: aForm in: destRect sourceRect: srcRect ^self drawImage: aForm in: destRect sourceRect: srcRect! ! !RomePluginCanvas methodsFor: 'drawing' stamp: 'bf 7/28/2006 17:47'! stencilImage: aForm in: destRect sourceRect: srcRect | f hibernate | f := aForm asSourceForm asRomePluginSourceForm. hibernate := f unhibernate. self primStencilImage: f destLeft: destRect left asFloat right: destRect right asFloat top: destRect top asFloat bottom: destRect bottom asFloat srcLeft: srcRect left asFloat right: srcRect right asFloat top: srcRect top asFloat bottom: srcRect bottom asFloat. hibernate ifTrue: [f hibernate].! ! !RomePluginCanvas methodsFor: 'attributes canvas' stamp: 'bf 7/24/2006 16:39'! clipRectangle: aRectangle ^self primClipRectangleLeft: aRectangle left asFloat right: aRectangle right asFloat top: aRectangle top asFloat bottom: aRectangle bottom asFloat ! ! !RomePluginCanvas methodsFor: 'attributes canvas' stamp: 'bf 8/28/2006 19:14'! fontMatrix ^fontMatrix ifNil: [fontMatrix := self matrixClass withScale: fontSize]! ! !RomePluginCanvas methodsFor: 'attributes canvas' stamp: 'bf 7/19/2006 14:03'! fontMatrix: aTransform fontMatrix := aTransform. fontSize := nil. "self primFontMatrix: aTransform asMatrixTransform2x3"! ! !RomePluginCanvas methodsFor: 'attributes canvas' stamp: 'bf 7/19/2006 14:01'! fontSize ^fontSize ifNil: [fontSize := fontMatrix scale y]! ! !RomePluginCanvas methodsFor: 'attributes canvas' stamp: 'bf 7/19/2006 13:59'! fontSize: aNumber fontSize := aNumber. fontMatrix := nil. self primFontSize: aNumber asFloat! ! !RomePluginCanvas methodsFor: 'attributes canvas' stamp: 'bf 7/19/2006 14:56'! font: aRomeFont font := aRomeFont. (aRomeFont isKindOf: RomeFreetypeFont) ifTrue: [self primFontFace: aRomeFont face handle]. ! ! !RomePluginCanvas methodsFor: 'attributes canvas' stamp: 'bf 7/28/2006 15:10'! selectFill: aFill aFill isColor ifFalse: [ flags := flags bitOr: FlagFill. ^aFill installOnRomePluginCanvas: self]. aFill privateAlpha = 0 ifTrue: [flags := flags bitClear: FlagFill. ^self]. flags := flags bitOr: FlagFill. ^self primFillColor: aFill privateRGB alpha: aFill privateAlpha! ! !RomePluginCanvas methodsFor: 'attributes canvas' stamp: 'bf 7/17/2006 22:43'! selectNoFill flags := flags bitClear: FlagFill. ! ! !RomePluginCanvas methodsFor: 'attributes canvas' stamp: 'bf 7/17/2006 22:43'! selectNoPen flags := flags bitClear: FlagStroke. ! ! !RomePluginCanvas methodsFor: 'attributes canvas' stamp: 'bf 7/31/2006 16:41'! selectPenWidth: aNumber color: aColor flags := flags bitClear: FlagStroke. (aNumber <= 0 or: [aColor isTransparent]) ifTrue: [^self]. flags := flags bitOr: aColor privateAlpha. strokeColor := aColor privateRGB. self primSetLineWidth: aNumber asFloat! ! !RomePluginCanvas methodsFor: 'initialize-release' stamp: 'bf 7/7/2006 16:16'! close handle ifNotNil: [ self primClose. self unregister. target ifNotNil: [target hibernate] ]. ! ! !RomePluginCanvas methodsFor: 'initialize-release' stamp: 'bf 7/7/2006 13:47'! finish self flush! ! !RomePluginCanvas methodsFor: 'initialize-release' stamp: 'bf 8/23/2006 11:16'! finish: aRectangle self flush: aRectangle! ! !RomePluginCanvas methodsFor: 'initialize-release' stamp: 'bf 7/7/2006 13:36'! flush target flush! ! !RomePluginCanvas methodsFor: 'initialize-release' stamp: 'bf 8/23/2006 11:12'! flush: aRectangle target flush: aRectangle! ! !RomePluginCanvas methodsFor: 'initialize-release' stamp: 'bf 7/17/2006 18:36'! initialize super initialize. flags := 0.! ! !RomePluginCanvas methodsFor: 'initialize-release' stamp: 'bf 7/7/2006 12:14'! open handle ifNil: [ target unhibernate. self primOpen. self register. ]. ! ! !RomePluginCanvas methodsFor: 'initialize-release' stamp: 'bf 7/7/2006 13:22'! setTarget: aForm target := aForm asRomePluginTargetForm. self open. ! ! !RomePluginCanvas methodsFor: 'state' stamp: 'bf 7/18/2006 12:31'! preserveStateDuring: aBlock self saveState. ^aBlock ensure: [self restoreState]. ! ! !RomePluginCanvas methodsFor: 'state' stamp: 'bf 7/18/2006 12:30'! restoreState "Restore the state from the internal stack" self copyFrom: stack. self primRestoreState.! ! !RomePluginCanvas methodsFor: 'state' stamp: 'bf 7/18/2006 12:29'! saveState "Save the state of the canvas onto the internal stack." stack := self clone. self primSaveState.! ! !RomePluginCanvas methodsFor: 'transforming' stamp: 'bf 7/17/2006 21:38'! preserveTransformDuring: aBlock "Reset transform after evaluating aBlock" | oldTransform | oldTransform := self transform. ^aBlock ensure: [self transform: oldTransform].! ! !RomePluginCanvas methodsFor: 'transforming' stamp: 'bf 7/17/2006 22:19'! rotateBy: angle ^self primRotateBy: angle degreesToRadians! ! !RomePluginCanvas methodsFor: 'transforming' stamp: 'bf 7/17/2006 20:51'! scaleBy: scale | p | p := scale asPoint. ^self primScaleByX: p x asFloat y: p y asFloat! ! !RomePluginCanvas methodsFor: 'transforming' stamp: 'bf 8/28/2006 19:13'! transform | tmp | tmp := self matrixClass new. self primGetTransform: tmp. ^tmp! ! !RomePluginCanvas methodsFor: 'transforming' stamp: 'bf 7/17/2006 21:06'! transformBy: aTransform aTransform transformRomePluginCanvas: self! ! !RomePluginCanvas methodsFor: 'transforming' stamp: 'bf 7/17/2006 21:37'! transform: aTransform self primSetTransform: aTransform asMatrixTransform2x3 ! ! !RomePluginCanvas methodsFor: 'transforming' stamp: 'bf 7/17/2006 20:32'! translateBy: aPoint ^self primTranslateByX: aPoint x asFloat y: aPoint y asFloat! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/29/2006 01:50'! primClear ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/24/2006 16:39'! primClipRectangleLeft: left right: right top: top bottom: bottom ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/3/2006 15:53'! primClose "ok to fail" handle := nil. ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/24/2006 16:58'! primDrawArc: radius x: x y: y from: angle1 to: angle2 ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/24/2006 17:18'! primDrawCurveFromX: x0 y: y0 viaX: x1 y: y1 andX: x2 y: y2 toX: x3 y: y3 ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/24/2006 18:04'! primDrawCurveFromX: x0 y: y0 viaX: x1 y: y1 toX: x3 y: y3 ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/19/2006 14:58'! primDrawGeneralBezierShape: arrayOfPointArrays ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/25/2006 14:55'! primDrawImage: aForm destLeft: dstL right: dstR top: dstT bottom: dstB srcLeft: srcL right: srcR top: srcT bottom: srcB ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/24/2006 16:42'! primDrawLineFromX: fromX y: fromY toX: toX y: toY ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/24/2006 18:17'! primDrawOvalLeft: left right: right top: top bottom: bottom ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/25/2006 17:31'! primDrawPolygon: aFloatArray ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/25/2006 17:31'! primDrawPolyline: aFloatArray ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/17/2006 17:08'! primDrawRectangleLeft: left right: right top: top bottom: bottom ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/18/2006 12:20'! primDrawRoundRectLeft: left right: right top: top bottom: bottom radius: radius corners: corners ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/18/2006 18:26'! primDrawZeroTerminatedUtf8String: utf8String ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/18/2006 18:56'! primDrawZeroTerminatedUtf8String: utf8String x: x y: y ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/17/2006 19:45'! primFillColor: rgbInt alpha: alphaInt ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/28/2006 14:39'! primFillLinearGradientOriginX: x0 y: y0 directionX: x1 y: y1 colorStops: aWordArray ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/28/2006 15:19'! primFillRadialGradientOriginX: x0 y: y0 directionX: x1 y: y1 colorStops: aWordArray ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/18/2006 18:28'! primFontFace: aFT2Handle ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/18/2006 18:29'! primFontSize: aFloat ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/19/2006 18:28'! primGetLineWidth ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/17/2006 21:35'! primGetTransform: aMatrixTransform ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/17/2006 19:47'! primitiveOpenAndRetry "A primitive failed. Try to fix the receiver by opening it and retry." handle ifNotNil: [^self primitiveFailed]. self open. handle ifNil: [^self primitiveFailed]. ^self primitiveRetry: thisContext sender. ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/7/2006 17:44'! primitiveRetry: aContext "send the message that activated aContext again" ^aContext receiver perform: aContext selector withArguments: ((1 to: aContext selector numArgs) collect: [:i | aContext at: i])! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/3/2006 12:29'! primOpen ^self primitiveFailed! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/18/2006 12:32'! primRestoreState ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/17/2006 20:34'! primRotateBy: angle ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/18/2006 12:32'! primSaveState ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/17/2006 20:48'! primScaleByX: x y: y ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/19/2006 18:27'! primSetLineWidth: aFloat ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/17/2006 21:35'! primSetTransform: aMatrixTransform ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/21/2006 15:16'! primShowZeroTerminatedUtf8String: utf8String x: x y: y "ignores pen" ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/28/2006 17:48'! primStencilImage: aForm destLeft: dstL right: dstR top: dstT bottom: dstB srcLeft: srcL right: srcR top: srcT bottom: srcB ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/17/2006 21:10'! primTransformBy: aMatrixTransform ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'primitives' stamp: 'bf 7/17/2006 20:37'! primTranslateByX: x y: y ^self primitiveOpenAndRetry ! ! !RomePluginCanvas methodsFor: 'debug' stamp: 'bf 7/7/2006 13:40'! printOn: aStream aStream nextPutAll: self class name. aStream nextPut: $(. self isExecutor ifTrue: [handle ifNotNil: [aStream nextPutAll: 'finalizer for #'; print: handle] ifNil: [aStream nextPutAll: 'finalized']] ifFalse: [handle ifNil: [aStream nextPutAll: 'closed'] ifNotNil: [aStream nextPut: $#; print: handle]. aStream nextPutAll: ' on '; print: target]. aStream nextPut: $) ! ! !RomePluginCanvas methodsFor: 'startup-shutdown' stamp: 'bf 7/3/2006 15:56'! shutDown self isExecutor ifFalse: [self close].! ! !RomePluginCanvas class methodsFor: 'accessing' stamp: 'bf 7/31/2006 20:19'! expectedPluginVersion "Automatically generated" ^26! ! !RomePluginCanvas class methodsFor: 'accessing' stamp: 'bf 7/31/2006 12:25'! expectedPluginVersion: aNumber self expectedPluginVersion = aNumber ifFalse: [ self class compile: 'expectedPluginVersion "Automatically generated" ^', aNumber asString].! ! !RomePluginCanvas class methodsFor: 'accessing' stamp: 'bf 7/31/2006 12:02'! pluginVersion ^self primPluginVersion! ! !RomePluginCanvas class methodsFor: 'accessing' stamp: 'bf 7/31/2006 12:07'! pluginVersionName self pluginAvailable ifTrue: [^Smalltalk listLoadedModules detect: [:ea | ea beginsWith: 'RomePlugin '] ifNone: ['']]. ^''! ! !RomePluginCanvas class methodsFor: 'accessing' stamp: 'bf 6/26/2006 15:33'! primPluginVersion ^0! ! !RomePluginCanvas class methodsFor: 'class initialization' stamp: 'bf 7/17/2006 19:25'! initialize "self initialize" Smalltalk addToShutDownList: self. FlagStroke := 255. "stores privateAlpha" FlagFill := 1 << 8. ! ! !RomePluginCanvas class methodsFor: 'testing' stamp: 'bf 6/26/2006 15:33'! pluginAvailable ^self primPluginVersion > 0! ! !RomePluginCanvas class methodsFor: 'registry' stamp: 'bf 6/30/2006 15:23'! register: anObject WeakArray isFinalizationSupported ifFalse:[^anObject]. self registry add: anObject! ! !RomePluginCanvas class methodsFor: 'registry' stamp: 'bf 6/30/2006 15:24'! registry WeakArray isFinalizationSupported ifFalse:[^nil]. ^Registry isNil ifTrue:[Registry := WeakRegistry new] ifFalse:[Registry].! ! !RomePluginCanvas class methodsFor: 'registry' stamp: 'bf 6/30/2006 15:23'! unregister: anObject WeakArray isFinalizationSupported ifFalse:[^anObject]. self registry remove: anObject ifAbsent:[]! ! !RomePluginCanvas class methodsFor: 'system shutdown' stamp: 'yo 6/7/2007 14:31'! shutDown ComposingCanvas := DrawingCanvas := PangoAvailable := nil. self allSubInstancesDo: [:each | each shutDown]. RomePluginForm allSubInstancesDo: [:each | each shutDown]. ! ! !RomePluginForm methodsFor: 'converting' stamp: 'bf 7/7/2006 13:54'! asRomePluginSourceForm ^self! ! !RomePluginForm methodsFor: 'converting' stamp: 'bf 7/7/2006 13:23'! asRomePluginTargetForm ^self! ! !RomePluginForm methodsFor: 'initialize-release' stamp: 'bf 8/23/2006 11:01'! flush self flush: self boundingBox! ! !RomePluginForm methodsFor: 'initialize-release' stamp: 'bf 8/23/2006 11:00'! flush: aRectangle super flush! ! !RomePluginForm methodsFor: 'initialize-release' stamp: 'bf 7/7/2006 13:59'! setExtent: extent depth: bitsPerPixel width := extent x asInteger. width < 0 ifTrue: [width := 0]. height := extent y asInteger. height < 0 ifTrue: [height := 0]. depth := bitsPerPixel. bits ifNotNil: [self error: 'handle not nil']. "bits are allocated in #unhibernate"! ! !RomePluginForm methodsFor: 'initialize-release' stamp: 'bf 7/6/2006 16:08'! setExtent: extent depth: bitsPerPixel bits: bitmap ^self error: 'This is an external form, bits access not possible'! ! !RomePluginForm methodsFor: 'startup-shutdown' stamp: 'bf 7/7/2006 20:10'! hibernate bits ifNotNil: [ self class destroyFormHandle: bits. bits := nil. self unregister. ].! ! !RomePluginForm methodsFor: 'startup-shutdown' stamp: 'bf 7/7/2006 11:59'! unhibernate bits ifNotNil: [^false]. bits := self primCreateFormHandle. self register. ^true! ! !RomePluginForm methodsFor: 'testing' stamp: 'bf 7/25/2006 14:50'! isRomePluginForm ^true! ! !RomePluginForm methodsFor: 'primitives' stamp: 'bf 7/7/2006 11:18'! primCreateFormHandle "create a surface of my extent and depth, answer its SurfacePlugin id" ^self primitiveFailed ! ! !RomePluginForm methodsFor: 'debug' stamp: 'bf 7/7/2006 13:51'! printOn: aStream aStream nextPutAll: self class name; nextPut: $(; nextPutAll: 'handle='; print: bits; nextPut: $,; print: width; nextPut: $x; print: height; nextPut: $x; print: depth; nextPut: $). ! ! !RomePluginForm methodsFor: 'finalization' stamp: 'bf 7/7/2006 11:48'! register self toFinalizeSend: #destroyFormHandle: to: self class with: bits! ! !RomePluginForm methodsFor: 'finalization' stamp: 'bf 7/7/2006 11:49'! unregister self finalizationRegistry remove: self! ! !RomePluginForm class methodsFor: 'finalization' stamp: 'bf 7/17/2006 20:02'! destroyFormHandle: aFormHandle self primDestroyFormHandle: aFormHandle! ! !RomePluginForm class methodsFor: 'finalization' stamp: 'bf 7/7/2006 11:13'! primDestroyFormHandle: aHandle "ok to fail" ! ! !RomePluginSourceForm methodsFor: 'accessing' stamp: 'bf 7/7/2006 13:53'! source: aForm source := aForm.! ! !RomePluginSourceForm methodsFor: 'overrides' stamp: 'bf 7/31/2006 13:18'! unhibernate | didUnhibernate | (didUnhibernate := super unhibernate) ifTrue: [ (source depth = 1 and: [source isColorForm not and: [SmalltalkImage current endianness == #little]]) ifTrue: [self copyBits: self boundingBox from: source at: 0@0 colorMap: (WordArray with: 0 with: 16rFF000000)] ifFalse: [ source displayOn: self at: self offset negated. source depth = 16 ifTrue: [self fixAlpha]]]. ^didUnhibernate ! ! !RomePluginTargetForm methodsFor: 'overrides' stamp: 'bf 8/23/2006 11:08'! flush self flush: target boundingBox! ! !RomePluginTargetForm methodsFor: 'overrides' stamp: 'bf 8/23/2006 11:08'! flush: aRectangle | rule | super flush: aRectangle. rule := (depth = 32) ifTrue: [34 "alphaBlendScaled"] ifFalse: [Form paint]. target copy: aRectangle from: self to: aRectangle origin rule: rule.! ! !RomePluginTargetForm methodsFor: 'private' stamp: 'bf 7/25/2006 13:22'! privateTarget ^target! ! !RomePluginTargetForm methodsFor: 'accessing' stamp: 'bf 7/7/2006 12:36'! target: aForm target := aForm! ! !RunArray methodsFor: '*pango' stamp: 'yo 12/12/2006 09:52'! clearCache pangoAttrCache := nil. lastIndex := nil. ! ! RomePluginCanvas initialize!