Skip to content

Commit

Permalink
fixed moving line control points, few protocol changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed May 13, 2024
1 parent dc792a1 commit 31d8efb
Show file tree
Hide file tree
Showing 84 changed files with 746 additions and 629 deletions.
4 changes: 2 additions & 2 deletions repository/OpenPonk-Roassal/Announcer.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #Announcer }
Extension { #name : 'Announcer' }

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
Announcer >> suspendAllOf: anObject while: aBlock [

| originalSubscriptions result |
Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-Roassal/Color.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #Color }
Extension { #name : 'Color' }

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
Color >> withTransparencyAsWhite [

^ self class
Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-Roassal/Float.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #Float }
Extension { #name : 'Float' }

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
Float >> closeTo: num absolutePrecision: aPrecision [

"Tell whether the receiver and arguments are close from each other given a absolute precision"
Expand Down
10 changes: 5 additions & 5 deletions repository/OpenPonk-Roassal/GEllipse.extension.st
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Extension { #name : #GEllipse }
Extension { #name : 'GEllipse' }

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GEllipse >> bottom [

^ coVertex y max: center y + center y - coVertex y
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GEllipse >> left [

^ vertex x min: center x + center x - vertex x
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GEllipse >> right [

^ vertex x max: center x + center x - vertex x
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GEllipse >> top [

^ coVertex y min: center y + center y - coVertex y
Expand Down
10 changes: 5 additions & 5 deletions repository/OpenPonk-Roassal/GPoint.extension.st
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Extension { #name : #GPoint }
Extension { #name : 'GPoint' }

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GPoint >> bottom [

^ self y
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GPoint >> left [

^ self x
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GPoint >> right [

^ self x
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GPoint >> top [

^ self y
Expand Down
10 changes: 5 additions & 5 deletions repository/OpenPonk-Roassal/GPolygon.extension.st
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Extension { #name : #GPolygon }
Extension { #name : 'GPolygon' }

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GPolygon >> bottom [

^ self encompassingRectangle bottom
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GPolygon >> left [

^ self encompassingRectangle left
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GPolygon >> right [

^ self encompassingRectangle right
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GPolygon >> top [

^ self encompassingRectangle top
Expand Down
10 changes: 5 additions & 5 deletions repository/OpenPonk-Roassal/GRectangle.extension.st
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Extension { #name : #GRectangle }
Extension { #name : 'GRectangle' }

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GRectangle >> bottom [

^ (self vertices at: 3) y
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GRectangle >> left [

^ (self vertices at: 1) x
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GRectangle >> right [

^ (self vertices at: 3) x
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GRectangle >> top [

^ (self vertices at: 1) y
Expand Down
10 changes: 5 additions & 5 deletions repository/OpenPonk-Roassal/GSegment.extension.st
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Extension { #name : #GSegment }
Extension { #name : 'GSegment' }

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GSegment >> bottom [

^ v1 y max: v2 y
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GSegment >> left [

^ v1 x min: v2 x
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GSegment >> right [

^ v1 x max: v2 x
]

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
GSegment >> top [

^ v1 y min: v2 y
Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-Roassal/Number.extension.st
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Extension { #name : #Number }
Extension { #name : 'Number' }

{ #category : #'*OpenPonk-Roassal' }
{ #category : '*OpenPonk-Roassal' }
Number >> closeTo: num absolutePrecision: aPrecision [
"are these two numbers close?"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
Class {
#name : #OPRSAbstractDraggableControlPointHandle,
#superclass : #Object,
#name : 'OPRSAbstractDraggableControlPointHandle',
#superclass : 'Object',
#instVars : [
'clickBox',
'line',
'shape'
],
#category : #'OpenPonk-Roassal-Polyline'
#category : 'OpenPonk-Roassal-Polyline',
#package : 'OpenPonk-Roassal',
#tag : 'Polyline'
}

{ #category : #accessing }
{ #category : 'shapes' }
OPRSAbstractDraggableControlPointHandle >> createClickBoxShape [

^ RSCircle new
Expand All @@ -18,7 +20,7 @@ OPRSAbstractDraggableControlPointHandle >> createClickBoxShape [
yourself
]

{ #category : #accessing }
{ #category : 'shapes' }
OPRSAbstractDraggableControlPointHandle >> createShape [

^ RSEllipse new
Expand All @@ -31,7 +33,7 @@ OPRSAbstractDraggableControlPointHandle >> createShape [
yourself
]

{ #category : #removing }
{ #category : 'actions' }
OPRSAbstractDraggableControlPointHandle >> remove [

shape remove.
Expand All @@ -46,12 +48,12 @@ OPRSAbstractDraggableControlPointHandle >> remove [
line := nil
]

{ #category : #accessing }
{ #category : 'accessing' }
OPRSAbstractDraggableControlPointHandle >> shape [
^ shape
]

{ #category : #accessing }
{ #category : 'shapes' }
OPRSAbstractDraggableControlPointHandle >> size [

^ self subclassResponsibility
Expand Down
26 changes: 14 additions & 12 deletions repository/OpenPonk-Roassal/OPRSAcceptDenyFeedbackBuilder.class.st
Original file line number Diff line number Diff line change
@@ -1,49 +1,51 @@
Class {
#name : #OPRSAcceptDenyFeedbackBuilder,
#superclass : #RSObject,
#name : 'OPRSAcceptDenyFeedbackBuilder',
#superclass : 'RSObject',
#instVars : [
'feedback'
],
#category : #'OpenPonk-Roassal-CreationFeedback'
#category : 'OpenPonk-Roassal-CreationFeedback',
#package : 'OpenPonk-Roassal',
#tag : 'CreationFeedback'
}

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
OPRSAcceptDenyFeedbackBuilder class >> acceptFeedbackFor: anObject [
^ self new acceptFeedbackFor: anObject
]

{ #category : #'as yet unclassified' }
{ #category : 'as yet unclassified' }
OPRSAcceptDenyFeedbackBuilder class >> denyFeedbackFor: anObject [
^ self new denyFeedbackFor: anObject
]

{ #category : #accessing }
{ #category : 'accessing' }
OPRSAcceptDenyFeedbackBuilder >> acceptColor [
^ Color green
]

{ #category : #protocol }
{ #category : 'protocol' }
OPRSAcceptDenyFeedbackBuilder >> acceptFeedbackFor: anObject [
^ self feedbackFor: anObject color: self acceptColor
]

{ #category : #accessing }
{ #category : 'accessing' }
OPRSAcceptDenyFeedbackBuilder >> denyColor [
^ Color red
]

{ #category : #protocol }
{ #category : 'protocol' }
OPRSAcceptDenyFeedbackBuilder >> denyFeedbackFor: anObject [
^ self feedbackFor: anObject color: self denyColor
]

{ #category : #private }
{ #category : 'private' }
OPRSAcceptDenyFeedbackBuilder >> feedback [

^ feedback
]

{ #category : #private }
{ #category : 'private' }
OPRSAcceptDenyFeedbackBuilder >> feedbackFor: anObject color: aColor [

(anObject respondsTo: #isShape) ifFalse: [
Expand All @@ -60,7 +62,7 @@ OPRSAcceptDenyFeedbackBuilder >> feedbackFor: anObject color: aColor [
color: aColor
]

{ #category : #protocol }
{ #category : 'protocol' }
OPRSAcceptDenyFeedbackBuilder >> remove [
^ self subclassResponsibility
]
Loading

0 comments on commit 31d8efb

Please sign in to comment.