Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing Sparta #202

Merged
merged 31 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8eff1ec
Removed sparta as dependency. This should fail!
tinchodias Dec 28, 2022
449164b
Convert visualBounds* and strokedBounds* family to generic Bloc
tinchodias Dec 28, 2022
0659fc8
Convert family of containsPoint:* protocol to Bloc
tinchodias Dec 28, 2022
e72cb4c
Convert offscreenMeasureTextParagraph: to Bloc
tinchodias Dec 28, 2022
d785354
Migrated Bloc-Exporter to Alexandrie
tinchodias Dec 29, 2022
cd5ddf8
Remove a new tools inspection on SpartaCanvas
tinchodias Dec 29, 2022
5e9524e
Remove references to preferableSpartaCanvas
tinchodias Dec 29, 2022
16ef34e
Remove Bloc-Sparta package!
tinchodias Dec 29, 2022
f7e6b7e
Remove many unused "system" extensions
tinchodias Dec 29, 2022
e79efd5
Re-add "Bloc-Exporter" package in baseline
tinchodias Dec 29, 2022
bd7c30e
Don't load Bloc-Compositor-Examples
tinchodias Dec 29, 2022
54d23fd
Delete package Bloc-Composition and its examples
tinchodias Dec 29, 2022
d02f059
Add two required methods from Bloc-Compositor
tinchodias Dec 29, 2022
035048e
Add Form>>stride, required by BlocHost-Morphic
tinchodias Dec 29, 2022
5345346
Group "api - compositing" methods in BlElement
tinchodias Dec 29, 2022
a4b1570
Make bloc-Alexandrie hosts independent from Sparta specific code
tinchodias Dec 29, 2022
6d068f9
Add class comments + use BA hosts by default
tinchodias Dec 29, 2022
805a5ec
Remove hosts tied to sparta & two BA diff inspectors
tinchodias Dec 29, 2022
03988fc
Remove BlMorphicHost, unused.
tinchodias Dec 29, 2022
11f3e55
Convert Bloc-Alexandrie hosts to Bloc, and make generic.
tinchodias Dec 29, 2022
9b47ba1
The "use*Host" protocol must be extension
tinchodias Dec 29, 2022
d18f747
Use System Settings to choose a BlHostRenderer
tinchodias Dec 29, 2022
fc12d74
Recover BlMorphicHost
tinchodias Dec 29, 2022
8eb031a
System Settings: Move preferableHostClass to BlHost
tinchodias Dec 29, 2022
302123c
BlHostRendererSurface hierarchy is not used... tag it as a reminder
tinchodias Dec 29, 2022
855548d
System Settings: Move preferableEventHandlerRegistry to BlHandlerRegi…
tinchodias Dec 29, 2022
bc05f94
Add a measureTextParagraph: that was implemented by Bloc-Sparta
tinchodias Dec 30, 2022
cc09a5c
One pixel changed in a test, no clue but..
tinchodias Dec 30, 2022
2168698
Remove leftovers of Sparta (not finished yet)
tinchodias Dec 30, 2022
fd14a78
Remove a couple of uneeded mentions to Sparta.
tinchodias Dec 30, 2022
c6369c5
Fix BlTextElementMeasurementStrategyExamples
tinchodias Dec 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions src/BaselineOfBloc/BaselineOfBloc.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,6 @@ BaselineOfBloc >> baseline: spec [
package: #'Bloc-Text-Tests' with: [
spec requires: #('Bloc-Text') ].

"Sparta canvas"
spec
baseline: 'Sparta' with: [
spec repository: 'github://pharo-graphics/Sparta:dev-1.0/src' ].
spec
package: #'Bloc-Compositor' with: [
spec requires: #('Bloc' 'Sparta') ];
package: #'Bloc-Sparta' with: [
spec requires: #('Sparta' 'Bloc' 'Bloc-Text' 'Bloc-Compositor') ].

"Alexandrie canvas"
spec
baseline: 'Alexandrie' with: [
Expand Down Expand Up @@ -106,7 +96,7 @@ BaselineOfBloc >> baseline: spec [
package: #'Bloc-UnitedTests' with: [
spec requires: #('Bloc' 'Bloc-Layout' 'Bloc-Animation') ];
package: #'Bloc-Exporter' with: [
spec requires: #('Sparta') ];
spec requires: #('Bloc-Alexandrie') ];
package: #'Bloc-DevTool' with: [
spec requires: #('Bloc-Layout' 'Bloc-UnitedTests') ];
package: #'Bloc-Scripter' with: [
Expand All @@ -115,8 +105,6 @@ BaselineOfBloc >> baseline: spec [
spec
package: #'Bloc-Examples' with: [
spec requires: #(#'Bloc-DevTool') ];
package: #'Bloc-Compositor-Examples' with: [
spec requires: #(#'Bloc-Examples') ];
package: #'Bloc-Text-Examples' with: [
spec requires: #(#'Bloc-Examples') ];
package: #'Bloc-Layout-Tests' with: [
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Alexandrie-Tests/BAHitTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ BAHitTest class >> inspectMismatches [
{ #category : #tests }
BAHitTest >> actualForm [

^ self hitFormFor: formSelector host: BAOSWindowSDL2Host new
^ self hitFormFor: formSelector host: BlOSWindowSDL2Host new
]

{ #category : #tests }
Expand Down
2 changes: 1 addition & 1 deletion src/Bloc-Alexandrie-Tests/BARenderTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ BARenderTest >> actualForm [

| aSpace |
aSpace := self formBehavior
host: BAOSWindowSDL2Host new;
host: BlOSWindowSDL2Host new;
perform: formSelector;
space.
^ aSpace aeAsForm
Expand Down
58 changes: 0 additions & 58 deletions src/Bloc-Alexandrie-Tests/BlHitDifferenceInspector.class.st

This file was deleted.

51 changes: 0 additions & 51 deletions src/Bloc-Alexandrie-Tests/BlRenderDifferenceInspector.class.st

This file was deleted.

2 changes: 1 addition & 1 deletion src/Bloc-Alexandrie-Tests/BlSpaceFixture.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ BlSpaceFixture >> buildGradients [

| aLinearGradient aRadialGradient anExtent |

"Bug? start and stop only give the direction (in Sparta)"
"Bug? start and stop only give the direction."
aLinearGradient := BlLinearGradientPaint new
start: 0@10;
end: 10@0;
Expand Down
47 changes: 0 additions & 47 deletions src/Bloc-Alexandrie/BAMorphicWindowHost.class.st

This file was deleted.

103 changes: 0 additions & 103 deletions src/Bloc-Alexandrie/BAOSWindowSDL2Host.class.st

This file was deleted.

19 changes: 19 additions & 0 deletions src/Bloc-Alexandrie/BARenderer.class.st
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
"
I am a host-renderer to draw a space's elements on an `AeCanvas`.

Both buffer and form host-spaces are supported.
"
Class {
#name : #BARenderer,
#superclass : #BlHostRenderer,
#category : #'Bloc-Alexandrie-Renderer'
}

{ #category : #accessing }
BARenderer class >> label [

^ 'Alexandrie'
]

{ #category : #'host - api' }
BARenderer class >> offscreenMeasureTextParagraph: aBlTextParagraph [

BAOffscreen instance measureTextParagraph: aBlTextParagraph
]

{ #category : #initialization }
BARenderer >> createBufferSpaceRenderer [

Expand All @@ -21,6 +38,8 @@ BARenderer >> initializeForHostSpace: aBlHostSpace [
"Initialize this renderer for a given host space.
Please note, that it I be called multiple times"

self initialize.

session := Smalltalk session.

"we should mark it as a current one before initializing a canvas as it may rely on opengl context"
Expand Down
24 changes: 0 additions & 24 deletions src/Bloc-Alexandrie/BlAnnulusSectorGeometry.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,3 @@ BlAnnulusSectorGeometry >> aeApplyTo: aeCanvas element: aBlElement [
outerRadius: self absoluteOuterRadius
] ]
]

{ #category : #'*Bloc-Alexandrie' }
BlAnnulusSectorGeometry >> aeContainsPoint: aPoint in: aBlElement [
"Answer whether aPoint is contained by this geometry.

Adapted from RSPieSlice>>#preciseIncludesPoint:"

| p d n a b |

"Check if distance is between right interval"
p := aPoint - self center.
d := p distanceTo: 0.0@0.0.
(d between: self absoluteInnerRadius and: self absoluteOuterRadius)
ifFalse: [ ^ false ].

"Check the angle"
n := p angle radiansToDegrees % 360.
a := self startAngle % 360.
b := self endAngle % 360.

^ a < b
ifTrue: [ n between: a and: b ]
ifFalse: [ a <= n or: [ n <= b ] ]
]
Loading