Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Canvas
Last updated at 9:50 pm UTC on 29 September 2017
Abstract class used by Morphic. Contains the interface to draw Morphs.

A canvas is a two-dimensional medium on which morphs are drawn in a device-independent manner. Canvases keep track of the origin and clipping rectangle, as well as the underlying drawing medium (such as a window, pixmap, or postscript script).

Subclasses must implement (at least) the following methods:
	* Drawing:
		#fillOval:color:borderWidth:borderColor:
		#frameAndFillRectangle:fillColor:borderWidth:borderColor:
		#drawPolygon:color:borderWidth:borderColor:
		#image:at:sourceRect:rule:
		#stencil:at:sourceRect:rule:
		#line:to:width:color:
		#paragraph:bounds:color:
		#text:bounds:font:color:
	* Support
		#clipBy:during:
		#translateBy:during:
		#translateBy:clippingTo:during:
		#transformBy:clippingTo:during:


 Canvas printHierarchy '
 ProtoObject #()
	Object #()
		NullEncoder #(''target'' ''filterSelector'')
			FlattenEncoder #()
				Canvas #()
					ColorMappingCanvas #(''myCanvas'')
						AlphaBlendingCanvas #(''alpha'')
						ShadowDrawingCanvas #(''shadowColor'')
					FormCanvas #(''origin'' ''clipRect'' ''form'' ''port'' ''shadowColor'')
						BalloonCanvas #(''transform'' ''colorTransform'' ''engine'' ''aaLevel'' ''deferred'')
						BlueFormCanvas #()
						ColorPatchCanvas #(''stopMorph'' ''foundMorph'' ''doStop'')
						MultiResolutionCanvas #(''deferredMorphs'')
					PluggableCanvas #()
						BufferedCanvas #(''remote'' ''previousVersion'' ''lastTick'' ''dirtyRect'' ''mirrorOfScreen'')
						CachingCanvas #(''cacheCanvas'' ''mainCanvas'')
						ClippingCanvas #(''canvas'' ''clipRect'')
						MultiCanvas #(''canvases'' ''extent'' ''depth'')
						NullCanvas #()
					PostscriptCanvas #(''origin'' ''clipRect'' ''currentColor'' ''shadowColor'' ''currentFont'' ''morphLevel'' ''gstateStack'' ''fontMap''
                                                           ''usedFonts'' ''psBounds'' ''topLevelMorph'' ''initialScale'' ''savedMorphExtent'' ''currentTransformation'' 
                                                           ''printSpecs'' ''pages'')
						DSCPostscriptCanvas #()
							DSCPostscriptCanvasToDisk #()
						EPSCanvas #()
					RemoteCanvas #(''innerClipRect'' ''outerClipRect'' ''transform'' ''connection'' ''shadowColor'')'