[Pkg] The Trunk: MorphicExtras-cmm.201.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Dec 7 19:06:11 UTC 2016
Chris Muller uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-cmm.201.mcz
==================== Summary ====================
Name: MorphicExtras-cmm.201
Author: cmm
Time: 7 December 2016, 1:05:55.913807 pm
UUID: 7898b77e-9ccd-435e-89ba-fe3d9868a05d
Ancestors: MorphicExtras-tfel.200
- Some naive patches and reverts to regain use of the Object Catalog and Paint tool.
=============== Diff against MorphicExtras-tfel.200 ===============
Item was changed:
----- Method: ObjectsTool>>installQuads:fromButton: (in category 'alphabetic') -----
installQuads: quads fromButton: aButton
"Install items in the bottom pane that correspond to the given set of quads, as triggered from the given button"
| aPartsBin sortedQuads oldResizing |
aPartsBin := self partsBin.
oldResizing := aPartsBin vResizing.
aPartsBin removeAllMorphs.
sortedQuads := (PartsBin translatedQuads: quads)
asSortedCollection: [:a :b | a third < b third].
+ sortedQuads := sortedQuads select: [ : each | Smalltalk hasClassNamed: each first ].
aPartsBin listDirection: #leftToRight quadList: sortedQuads.
aButton ifNotNil: [self tabsPane highlightOnlySubmorph: aButton].
aPartsBin vResizing: oldResizing.
aPartsBin layoutChanged; fullBounds.
self isFlap ifFalse: [ self minimizePartsBinSize ].!
Item was changed:
----- Method: PaintBoxMorph>>offsetFromMaxBounds (in category 'other') -----
offsetFromMaxBounds
"location of normal PaintBox within maxBounds."
| left |
left := self left.
+ ((Preferences canUnderstand: #useBiggerPaintingBox) and: [ Preferences useBiggerPaintingBox ]) ifTrue: [left := left - (( self width * 1.5)- self width)].
- Preferences useBiggerPaintingBox ifTrue: [left := left - (( self width * 1.5)- self width)].
^ left - colorMemory left @ 0!
Item was added:
+ ----- Method: Preferences class>>rotationAndScaleHandlesInPaintBox (in category '*morphicextras') -----
+ rotationAndScaleHandlesInPaintBox
+ ^ true!
Item was changed:
----- Method: SketchEditorMorph>>mouseMove: (in category 'event handling') -----
mouseMove: evt
+ "In the middle of drawing a stroke. 6/11/97 19:51 tk"
- "In the middle of drawing a stroke of any kind."
+ | pt priorEvt |
- | pt priorEvt actionSelector |
WorldState canSurrenderToOS: false. "we want maximum responsiveness"
pt := evt cursorPoint.
priorEvt := self get: #lastEvent for: evt.
(priorEvt notNil and: [pt = priorEvt cursorPoint]) ifTrue: [^self].
+ self perform: (self getActionFor: evt) with: evt.
- self perform: (actionSelector := self getActionFor: evt) with: evt.
"Each action must do invalidRect:"
self
set: #lastEvent
for: evt
to: evt.
false
ifTrue:
["So senders will find the things performed here"
self
paint: nil;
fill: nil;
erase: nil;
pickup: nil;
stamp: nil.
self
rect: nil;
ellipse: nil;
polygon: nil;
line: nil;
star: nil]!
Item was changed:
----- Method: SketchEditorMorph>>paint: (in category 'actions & preps') -----
paint: evt
"While the mouse is down, lay down paint, but only within window bounds.
11/28/96 sw: no longer stop painting when pen strays out of window; once it comes back in, resume painting rather than waiting for a mouse up"
+ | mousePoint startRect endRect startToEnd pfPen myBrush |
+
- | mousePoint startToEnd pfPen newPoint |
pfPen := self get: #paintingFormPen for: evt.
+ myBrush := self getBrushFor: evt.
mousePoint := evt cursorPoint.
+ startRect := pfPen location + myBrush offset extent: myBrush extent.
+ pfPen goto: mousePoint - bounds origin.
+ endRect := pfPen location + myBrush offset extent: myBrush extent.
+ "self render: (startRect merge: endRect). Show the user what happened"
+ startToEnd := startRect merge: endRect.
- newPoint := mousePoint - bounds origin.
- startToEnd := pfPen regionFor: newPoint.
- evt shiftPressed
- ifTrue: [pfPen gotoBack: newPoint]
- ifFalse: [pfPen goto: newPoint].
self invalidRect: (startToEnd translateBy: bounds origin).
!
More information about the Packages
mailing list