'From Cuis 5.0 [latest update: #4230] on 23 June 2020 at 4:29:48 pm'!
!classDefinition: #VectorGraphicsPasteUpMorph category: #'VectorGraphics-Experiments'!
PasteUpMorph subclass: #VectorGraphicsPasteUpMorph
	instanceVariableNames: 'vectorCanvas'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'VectorGraphics-Experiments'!

!VectorGraphicsPasteUpMorph commentStamp: '<historical>' prior: 0!
VectorGraphicsPasteUpMorph new openInWorld!


!VectorGraphicsPasteUpMorph methodsFor: 'drawing' stamp: 'jmv 6/23/2020 13:28:45'!
canvasForSubmorphs: aCanvas
	"Use VectorCanvas for submorphs.
	Useless when submorphs grabbed by the hand..."

	| engine |
	vectorCanvas isNil ifTrue: [
		vectorCanvas _ VectorCanvas basicNew ].
	engine _ vectorCanvas engine.
	vectorCanvas copyFrom: aCanvas.
	vectorCanvas hackEngine: engine.
	vectorCanvas setClipRect: aCanvas clipRect.
	^vectorCanvas! !


!VectorCanvas methodsFor: 'private' stamp: 'jmv 6/23/2020 16:29:35'!
hackEngine: anEngine
	"Only for VectorGraphicsPasteUpMorph.
	Either clean up, or eventually delete."

	engine _ anEngine.
	(engine class ~= VectorEngineWholePixel or: [ (engine instVarNamed: 'targetForm') ~= form ]) ifTrue: [
		engine _ VectorEngineWholePixel onForm: form ].
	engine currentMorph: currentMorph.
	engine geometryTransformation: currentTransformation.
	engine resetMorphBounds.! !

