Skip to content

Commit

Permalink
Add MorphicMonet instance to context
Browse files Browse the repository at this point in the history
and change all affected constructors and test setups
  • Loading branch information
kbroschke committed Jul 19, 2022
1 parent 7da89f0 commit d520177
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
instance creation
newWithBackendClass: aBackendClass viewportClass: aViewPortClass extent: aPoint
newWithBackendClass: aBackendClass viewportClass: aViewPortClass extent: aPoint for: aMorphicMonet
| canvas context backend viewPort |
canvas := self basicNew.
context := M2DrawingContext new.
context := M2DrawingContext newFor: aMorphicMonet.
backend := aBackendClass basicNew.
viewPort := aViewPortClass basicNew.
context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
instance creation
newWithBackendClass: aBackendClass viewportClass: aViewPortClass
^ self newWithBackendClass: aBackendClass viewportClass: aViewPortClass extent: self defaultExtent
newWithBackendClass: aBackendClass viewportClass: aViewPortClass for: aMorphicMonet
^ self newWithBackendClass: aBackendClass viewportClass: aViewPortClass extent: self defaultExtent for: aMorphicMonet

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
instance creation
newWithDefaultsFor: aMorphicMonet
^ self newWithExtent: self defaultExtent for: aMorphicMonet
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
instance creation
newWithExtent: aPoint
^ self newWithBackendClass: M2Backend viewportClass: M2ViewPort extent: aPoint
newWithExtent: aPoint for: aMorphicMonet
^ self newWithBackendClass: M2Backend viewportClass: M2ViewPort extent: aPoint for: aMorphicMonet
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"class" : {
"defaultBackgroundColor" : "SW 6/14/2022 19:26",
"defaultExtent" : "md 6/17/2022 16:04",
"newWithBackendClass:viewportClass:" : "md 6/17/2022 16:11",
"newWithBackendClass:viewportClass:extent:" : "md 7/11/2022 17:38",
"newWithDefaults" : "md 6/17/2022 16:07",
"newWithExtent:" : "md 6/17/2022 16:10" },
"newWithBackendClass:viewportClass:extent:for:" : "kbr 7/19/2022 16:30",
"newWithBackendClass:viewportClass:for:" : "kbr 7/19/2022 16:27",
"newWithDefaultsFor:" : "kbr 7/19/2022 15:59",
"newWithExtent:for:" : "kbr 7/19/2022 16:02" },
"instance" : {
"addGripMorph:" : "JP 5/19/2021 00:31",
"backend" : "md 7/11/2022 17:38",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
instance creation
newFor: aMorphicMonet
^ self new morphicMonet: aMorphicMonet
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
morphicMonet: aMorphicMonet
morphicMonet := aMorphicMonet

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
morphicMonet
^ morphicMonet
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"class" : {
},
"newFor:" : "kbr 7/19/2022 16:30" },
"instance" : {
"activeTool" : "md 7/16/2022 22:59",
"activeTool:" : "md 7/16/2022 23:03",
Expand Down Expand Up @@ -49,6 +49,8 @@
"isInTextMode" : "CS 6/11/2021 17:30",
"mode" : "CS 6/28/2021 17:33",
"mode:" : "CS 6/11/2021 17:30",
"morphicMonet" : "kbr 7/19/2022 15:03",
"morphicMonet:" : "kbr 7/19/2022 15:04",
"pencilSize" : "CS 6/11/2021 17:33",
"pencilSize:" : "md 7/16/2022 22:48",
"rectangleBrushSize" : "md 6/18/2022 17:26",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"eraserSize",
"isFillingGeometricForm",
"mode",
"morphicMonet",
"pencilSize" ],
"name" : "M2DrawingContext",
"pools" : [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
instance creation
open
^ self openWith: M2Canvas newWithDefaults
^ self openWith: (M2Canvas newWithDefaultsFor: self)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"class" : {
"addToWorldMenu" : "K.P. 5/27/2021 11:21",
"newWith:" : "CS 8/5/2021 21:57",
"open" : "md 6/17/2022 16:08",
"open" : "kbr 7/19/2022 15:49",
"openWith:" : "6/28/2021 21:03:28" },
"instance" : {
"activateDefaultItem" : "CS 8/5/2021 22:07",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ running
setUp
| canvas |
super setUp.
canvas := M2Canvas newWithExtent: 100 asPoint.
canvas := M2Canvas newWithExtent: 100 asPoint for: self.
self
canvas: canvas;
backend: canvas backend;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"prepareTestOnNewLayer" : "md 6/26/2022 14:10",
"releaseShift" : "ms 5/27/2022 16:47",
"renderCanvas" : "md 6/18/2022 17:55",
"setUp" : "md 6/18/2022 17:54",
"setUp" : "kbr 7/19/2022 16:01",
"tearDown" : "mk 7/25/2020 16:26",
"testBrushSize" : "CS 7/8/2021 12:17",
"testBrushSizeOnNewLayer" : "md 6/26/2022 14:21",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ setUp
self wantsToTest: (MorphicMonetMock
newWith: (M2Canvas
newWithBackendClass: M2BackendMock
viewportClass: M2ViewPort))
viewportClass: M2ViewPort
for: MorphicMonetMock))
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"isButtonActivated:" : "ms 7/26/2021 14:32",
"isButtonEnabled:" : "ms 7/26/2021 14:32",
"menuButtonsDict" : "md 7/16/2022 23:51",
"setUp" : "md 6/17/2022 16:34",
"setUp" : "kbr 7/19/2022 16:04",
"testAreButtonNamesUnique" : "K.P. 8/1/2021 19:42",
"testAreColorMorphsThere" : "CS 8/4/2021 17:58",
"testAreCustomizableColorMorphsThere" : "CS 8/4/2021 17:58",
Expand Down

0 comments on commit d520177

Please sign in to comment.