[squeak-dev] The Trunk: Graphics-dtl.102.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jan 24 20:13:26 UTC 2010


David T. Lewis uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-dtl.102.mcz

==================== Summary ====================

Name: Graphics-dtl.102
Author: dtl
Time: 24 January 2010, 3:03:34.773 pm
UUID: da206183-54d9-46a8-b1e1-32b61d08aa60
Ancestors: Graphics-ar.101

Remove all MVC BitEditor references from non-MVC packages.
  Form>>bitEdit to Project class>>bitEdit:
  Form>>bitEditAt:scale: to Project class>>bitEdit:at:scale:
  BitEditor class>>locateMagnifiedView:scale: to Rectangle class>>locateMagnifiedView:scale:

=============== Diff against Graphics-ar.101 ===============

Item was changed:
  ----- Method: Form>>bitEditAt:scale: (in category 'editing') -----
  bitEditAt: magnifiedFormLocation scale: scaleFactor 
  	"Create and schedule a view whose top left corner is magnifiedLocation 
  	and that contains a view of the receiver magnified by scaleFactor that 
  	can be modified using the Bit Editor. It also contains a view of the 
  	original form."
  
+ 	Project current bitEdit: self at: magnifiedFormLocation scale: scaleFactor 
+ !
- 	BitEditor openOnForm: self at: magnifiedFormLocation scale: scaleFactor !

Item was changed:
  ----- Method: StrikeFont>>edit: (in category 'character shapes') -----
  edit: character 
  	"Open a Bit Editor on the given character. Note that you must do an accept 
  	(in the option menu of the bit editor) if you want this work. 
  	Accepted edits will not take effect in the font until you leave or close the bit editor. 
  	Also note that unaccepted edits will be lost when you leave or close."
  	"Note that BitEditor only works in MVC currently."
  
+ 	"(TextStyle default fontAt: 1) edit: $="
- 	"(TextStyle default fontAt: 1) edit: $:="
  
+ 	Project current editCharacter: character ofFont: self!
- 	| charForm editRect scaleFactor bitEditor savedForm r |
- 	charForm := self characterFormAt: character.
- 	editRect := BitEditor locateMagnifiedView: charForm scale: (scaleFactor := 8 @ 8).
- 	bitEditor := BitEditor
- 				bitEdit: charForm
- 				at: editRect topLeft
- 				scale: scaleFactor
- 				remoteView: nil.
- 	savedForm := Form fromDisplay: (r := bitEditor displayBox
- 							expandBy: (0 @ 23 corner: 0 @ 0)).
- 	bitEditor controller startUp.
- 	bitEditor release.
- 	savedForm displayOn: Display at: r topLeft.
- 	self characterFormAt: character put: charForm!

Item was added:
+ ----- Method: Rectangle class>>locateMagnifiedView:scale: (in category 'instance creation') -----
+ locateMagnifiedView: aForm scale: scaleFactor
+ 	"Answer a rectangle at the location where the scaled view of the form,
+ 	aForm, should be displayed."
+ 
+ 	^ self originFromUser: (aForm extent * scaleFactor + (0 at 50))
+ !

Item was changed:
  ----- Method: Form>>bitEdit (in category 'editing') -----
  bitEdit
  	"Create and schedule a view located in an area designated by the user 
  	that contains a view of the receiver magnified by 8 at 8 that can be 
  	modified using the Bit Editor. It also contains a view of the original 
  	form."
  
+ 	Project current bitEdit: self
+ !
- 	Smalltalk isMorphic
- 		ifFalse: [BitEditor openOnForm: self]
- 		ifTrue: [self currentHand attachMorph: (FatBitsPaint new
- 			editForm: self;
- 			magnification: 8;
- 			brushColor: Color black;
- 			penSize: 1;
- 			yourself)].
- 
- 	"Note that using direct messages to BitEditor, fixed locations and scales can be created.
- 	That is, also try:
- 		BitEditor openOnForm: self at: <some point>
- 		BitEditor openOnForm: self at: <some point> scale: <some point>"!




More information about the Squeak-dev mailing list