-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Writing examples to help fixing #23, not API problem but user problem :)
- Loading branch information
1 parent
daf443b
commit da26613
Showing
3 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Class { | ||
#name : #GeoLabeledCircleProcessData, | ||
#superclass : #GeoShapeLabeledProcessData, | ||
#category : #'GeoView-GeoObjects-ProcessData' | ||
} | ||
|
||
{ #category : #processing } | ||
GeoLabeledCircleProcessData >> processCreatedData: aKey incoming: aGeoCircle with: aDCompositeShape context: aContext [ | ||
| dLeafShape dCompositeShape | | ||
dCompositeShape := super processCreatedData: aKey incoming: aGeoCircle with: aDCompositeShape context: aContext. | ||
|
||
dLeafShape := SmockDCircle key: #geoShape. | ||
dLeafShape radius: aGeoCircle radiusInMeters. | ||
dLeafShape fillStyle: aGeoCircle fillStyle copy. | ||
dLeafShape strokeStyle: aGeoCircle strokeStyle copy. | ||
|
||
dCompositeShape addChild: dLeafShape. | ||
|
||
^ dCompositeShape | ||
] | ||
|
||
{ #category : #processing } | ||
GeoLabeledCircleProcessData >> processUpdatedData: aKey incoming: aGeoCircle with: aDCompositeShape context: aContext [ | ||
| dCompositeShape | | ||
dCompositeShape := aDCompositeShape. | ||
super processUpdatedData: aKey incoming: aGeoCircle with: aDCompositeShape context: aContext. | ||
|
||
(dCompositeShape getChild: #geoShape) ifNotNil:[ :e | | ||
e radius: aGeoCircle radiusInMeters. | ||
dCompositeShape updateChild: e. | ||
]. | ||
|
||
^dCompositeShape | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Class { | ||
#name : #GeoShapeLabeledProcessData, | ||
#superclass : #GeoObjectProcessData, | ||
#category : #'GeoView-GeoObjects-ProcessData' | ||
} | ||
|
||
{ #category : #processing } | ||
GeoShapeLabeledProcessData >> processCreatedData: aKey incoming: aGeoShape with: aDCompositeShape context: aContext [ | ||
| dCompositeShape dLabel | | ||
dCompositeShape := aDCompositeShape ifNil:[SmockDCompositeShape new]. | ||
super processCreatedData: aKey incoming: aGeoShape with: dCompositeShape context: aContext. | ||
|
||
"create a label" | ||
dLabel := SmockDText key: #label. | ||
dLabel fillColor: Color white. | ||
dLabel smockFont: SmockFont defaultFont. | ||
dLabel text: aGeoShape printString. | ||
dLabel coordinatesDeviceOffset: -30 @ -30. | ||
dCompositeShape addChild: dLabel. | ||
|
||
^ dCompositeShape | ||
] | ||
|
||
{ #category : #processing } | ||
GeoShapeLabeledProcessData >> processUpdatedData: aKey incoming: aGeoShape with: aDCompositeShape context: aContext [ | ||
| dCompositeShape | | ||
dCompositeShape := aDCompositeShape. | ||
super processUpdatedData: aKey incoming: aGeoShape with: dCompositeShape context: aContext. | ||
|
||
(aDCompositeShape getChild: #geoShape) ifNotNil: [ :e | | ||
e fillStyle: aGeoShape fillStyle copy. | ||
e strokeStyle: aGeoShape strokeStyle copy. | ||
]. | ||
|
||
^ dCompositeShape | ||
] |